简体   繁体   中英

Archival Policy in Solr to reduce index file size without impacting performance

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM