During early development it is common to discard an index and reload the data under a new schema. Our SearchStax Managed Search service customers often ask us how to “drop” or empty a Sol index.
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:
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.
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.
Questions?
Do not hesitate to contact the SearchStax Support Desk.