0
votes

I wish to clear the data from SOLR cloud 4.3 (both from index and disc - no recovery is needed)
I ran the following query:

http://host:port/solr/core/update?stream.body=<delete><query>*:*</query></delete>&commit=true

This delete the data from the index itself, but the data is still on the disc (I am not familiar with how solr is saving the data, but disc size remain the same). Is there a property that i need to add inorder to delete the data itself from disc ?
There are 2 shards managed with zookeeper.

Thanks

1

1 Answers

1
votes

When you run the query all the documents will be marked as deleted. It will not clean up the space immediately. When the next time segment merger will execute, it will discard all the deleted document from the old segments. Once the merging process completes, old segments are discarded and space will be claimed.

The underline lucene data structure for store is called, segment. This is immutable in nature. So you cannot update/delete the entries from it directly. When the background merge of the segment happens as per the merge policy defined in the configuration. The update/delete will reflect into the new segment. Till then it just set a bit indicating, document is deleted so don't include in results.

Also the partial updates in the solr are treating as deleting the old document and re-index with whatever has updated.