SearchStax

The SearchStax® Frequently Asked Questions page includes the following approved question and answer about our Apache Solr Cloud services.


How to Empty a Solr Index

During early development it is common to discard an index and reload the data under a new schema. Our Managed Solr customers often ask us how to “drop” or empty a Sol index.

In the early years of SearchStax, we recommended using a delete query to empty an existing index. At that time, this was a very simple thing to do.

https:/<load_balancer_URL>/solr/<collection_name>/update?stream.body=<delete><query>*:*</query></delete>&commit=true'

As time passed, however, we were forced to apply some security patches to various versions of Solr and Zookeeper, and these eventually made it cumbersome to run an /update command. People had to ask SearchStax support for assistance.

SearchStax now recommends that you “empty” an old index by deleting and recreating it. This is easy to do from the Solr Dashboard.

Delete a Collection (an Index)

To delete a collection (all parts of the same index on all nodes) open the Solr Dashboard and navigate to the Collections node:

SearchStax Empty Solr Index

Select the appropriate collection and use the Delete button. (Be sure to note the Shard count, configName, and replicationFactor settings.)

Recreate the Collection

Return to the Collections node and click the Add Collection button.

SearchStax Empty Solr Index

Fill in the appropriate parameters for the new collection. Note that numShards is almost always 1. ReplicationFactor is the number of Solr nodes in your deployment.

Next Step

Don’t overlook the fact that you have to reload your data into the collection.


We love to answer questions!

Please contact the SearchStax Support Desk immediately if you have any question about Solr Cloud deployments.

Return to Frequently Asked Questions.