Reputation: 1103
I am working on Solr and found that expiring a record does not delete its index.
Which means the index file will keep growing even after an auto expiration for each record.
I searched many document and found that without optimization there is now way we can reduce index file size. But it would impact the write as whole index would needs to be re-written.
Do SOLr index size decrease after deleting documents?
SOLR - delete documents depending on index size
Is there any way we can achieve this without having any downtime.
As we use Mongo also and it is easy in case of Mongo as we just restart a secondary server with repair option periodically and once it is done we make it primary.
I am looking for some auto set up that can be created in Solr also to achieve same.
Thanks Virendra Agarwal
Upvotes: 0
Views: 197
Reputation: 15771
I think you mean you are using TTL feature. The docs get deleted from the index, but the space is not automatically released until a merge is done for the segment containing the doc.
But note however, that doing an Optimize does not mean downtime, it means higher cpu/io during the optimize, the caches being invalidated etc, but not downtime per se.
So maybe you can issue an optimize during off hours, or you could also look at using commit with expungeDeletes.
Upvotes: 2