Deleting Solr data

Steps to delete a Cassandra table and its data, including the data indexed in Solr.

To delete a Cassandra table and its data, including the data indexed in Solr, from a DSE Search node, drop the table using CQL. The following example assumes that you ran the example of using a collection set. List the Solr files on the file system, drop the table named mysolr that the demo created, and then verify that the files are deleted from the file system.
Note: You can drop a column from a CQL table with a Solr secondary index only when the removal request is against a search node, and the column is not present in the Solr schema or the column is set to indexed=false and docValues=false.

Wait until you finish working through all the examples before you delete the example data.

Procedure

  1. List the Solr data files on the file system.
    • Installer-Services and Package installations:
      ls /usr/local/var/lib/dse/data/solr.data/mykeyspace.mysolr/index/
    • Installer-No Services and Tarball installations:
      ls /var/lib/cassandra/data/solr.data/mykeyspace.mysolr/index
    The output looks something like this:
    _33.fdt      _35_nrm.cfe   _38_Lucene40_0.tim
    _33.fdx      _35_nrm.cfs   _38_Lucene40_0.tip
    _33.fnm      _36.fdt     _38_nrm.cfe
    . . .
    
  2. Launch cqlsh and execute the CQL command to drop the table named solr.
    DROP TABLE mykeyspace.mysolr;
  3. Exit cqlsh and verify that the files are deleted from the file system. For example:
    ls /var/lib/cassandra/data/solr.data/mykeyspace.mysolr/index
    The output is:
    ls: /var/lib/cassandra/data/solr.data/mykeyspace.mysolr/index: No such file or directory