Unloading a Solr core

To disable search on a core, unload the Solr core without removing its backing table.

To disable full text search on a core, unload the core without removing its backing table.

To simplify Solr code unloading, use dsetool unload_core. Everything that is related to the unload_core operation is distributed, except for the deletion of the index directory, which is controlled with the distributed option.

The syntax of the command is:

$ dsetool unload_core keyspace.table [option ...]
where option is one or more of the following options:
Option Settings Default Description
deleteDataDir= true or false false If true, deletes index data and any other artifacts in the solr.data directory. It does not delete Cassandra data.
deleteResources= true or false false If true, deletes the resources associated with the Solr core. For example, solrconfig.xml and schema.xml.
distributed= true or false true If true, deletes Solr data and resources across the cluster, depending on the values of deleteDataDir and deleteResources.

The removal of the Solr secondary index from the Cassandra table schema is always distributed.

This command preserves the case of keyspace and table names. You must use the correct case for the keyspace and table names.

When authentication is enabled, the dsetool command is not available. Instead, use:
curl -u username:password "http://localhost:8983/solr/admin/cores?action=UNLOAD&name=keyspace.table"
Note: If one or more nodes fail to unload the core in distributed operations, an error message indicates the failing node or nodes. Issue the unload again.
If you unload a core when nodes are down, error messages might log when nodes are restarted. You can ignore error messages like:
Secondary index for core keyspace.table not found, is it dropped/unloaded?
No resource solrconfig.xml for core keyspace.table, did you miss to upload it?
No resource schema.xml for core keyspace.table, did you miss to upload it?
Core is safely unloaded and nodes correctly restart.