Deleting a collection

Deleting a Solr collection deletes the collection and its index, but does not delete its configuration files.

If you have enabled Ranger for authorization, you must have Solr Admin permission to be able to delete collections.
  1. If you are using Kerberos, kinit as a user with permission to delete the collection:
    kinit solradmin@[***EXAMPLE.COM***]

    Replace [***EXAMPLE.COM***] with your Kerberos realm name.

  2. On a host running Solr Server, make sure that the SOLR_ZK_ENSEMBLE environment variable is set in /etc/solr/conf/ For example:
    $ cat /etc/solr/conf/

    If you are using Cloudera Manager, this is automatically set on hosts with a Solr Server or Gateway role.

  3. Delete the collection:
    solrctl collection --delete [***COLLECTION NAME***]
    Replace [***COLLECTION NAME***] with the name of the collection you want to delete.