Toggle menu

deleteOldSolrData

deleteOldSolrData(ctx, keytype, version)

Deletes a collection from SOLR.

Parameters

NameTypeDescription
ctxStruct, requiredDatabase details, see above
keytypeString, requiredThe name of the collection
versionInteger, requiredThe earliest version of the data to keep. Versions earlier than this will be deleted

Returns

Boolean. True when the collection is deleted.

Example

<cfset ds=APPLICATION.datasource>
<cfset dt=APPLICATION.databasetype>
<!--- get a data importer --->
<cfmodule template="/icm/admin/dataimport/importer_v1.cfm" name="di" datasource=#ds# databasetype=#dt#>
<!--- delete a solr collection --->
<cfset di.deleteOldSolrData(ctx=#di#,
       version=15,
       keytype="name"
       )>
<cfoutput>...Done<br></cfoutput><cfflush>

Last modified on 30 September 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon