On 8/8/2016 3:10 AM, Callum Lamb wrote:
> How true is this claim? Is optimizing still a good idea for the
> general case?

For the general case, optimizing is not recommended.  If there are a
very large number of deleted documents, which does describe your
situation, then there is definitely a benefit.

In cases where there are a lot of deleted documents, scoring can be
affected by the presence of the deleted documents, and the drop in index
size after an optimize can result in a large performance boost.  For the
general case where there are not many deletes, there *is* a performance
benefit to optimizing down to a single segment, but it is nowhere near
as dramatic as it was in the 1.x/3.x days.

The problem with optimizes in the general case is this:  The performance
hit that the optimize operation itself causes may not be worth the small
performance improvement.

If you have a time where your index is quiet enough that the optimize
itself won't be disruptive, then you should certainly take advantage of
that time and do the optimize, even if there aren't many deletes.

There is another benefit to optimizes that doesn't get mentioned often: 
It can make subsequent normal merging operations during indexing faster,
because there will not be as many large segments.

Thanks,
Shawn

Reply via email to