Deleting Solr data

To delete a Cassandra table and its data, including the data indexed in Solr, from a Solr node, drop the table using CQL.

To delete a Cassandra table and its data, including the data indexed in Solr, from a Solr node, drop the table using CQL. The following example, which assumes you ran the example of using a collection set, lists the Solr files on the file system, drops the table named mysolr that the demo created, and then verifies that the files have been deleted from the file system:

Wait until you've finished working through all the examples in this document before actually deleting 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 check that the files have been deleted on 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