I have a Cassandra
table for which I have enabled Solr
indexing, using command
dsetool create_core <keyspace>.<table> [<option> ...]
Question is how to delete this core?
I have tried unload
via HTTP Api
which returned UNLOAD unsupported!
Update,
unload_core is now avaliable as of DSE 4.8 -- DSP-1533
Verbatim from the DataStax docs
Unloading a Solr core 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. The syntax of the command is:
$ dsetool unload_core . [ ...] where is one or more of the following options: Option Settings Default Description of default setting deleteDataDir= true or false false Retains the underlying Cassandra data. deleteResources= true or false false Retains the core configuration and schema resources. distributed= true or false true Deletes resources and data across the cluster. The distributed option governs the removal of data and resources. The Solr secondary indexes on the backing table are removed through Cassandra schema propagation even if distributed=false. 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.
Core unloading support exists in DSE 4.8, as another answer now mentions. For DSE 4.7 and older, you'll want to perform the following steps:
cqlsh
, remove all custom secondary indexes from the table that backs your Solr core.cqlsh
, remove Solr resources for the core in question, like schema.xml
and solrconfig.xml
from the table solr_admin.solr_resources
.After performing step 1, no further indexing will occur on the node, and after performing steps 2 & 3 and restarting, there will be no trace of the core left.
Note: At the end of this process, the Cassandra table that backed your core should still be available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With