On 6/6/2019 11:27 PM, jena wrote:
Because of heavy indexing & deletion, we optimise solr instance everyday,
because of that our solr cloud getting unstable , every solr instance go on
recovery mode & our search is getting affected & very slow because of that.
Optimisation takes around 1hr 30minutes.

Ordinarily, optimizing would just be a transparent operation and even though it's slow, wouldn't be something that would interfere with index operation.

But if you add deleteByQuery to the mix, then you WILL have problems. These problems can occur even if you don't optimize -- because sometimes the normal segment merges will take a very long time like an optimize, and the same interference between deleteByQuery and segment merging will happen.

The fix for that is to stop doing deleteByQuery. Replace it with a two step operation where you first do the query to get ID values, and then do deleteById. That kind of delete will not have any bad interaction with segment merging.

Thanks,
Shawn

Reply via email to