You may want to optimize an index in certain situations -- ie: if you
build your index once, and then never modify it.
If you have a rapidly changing index, rather than optimizing, you likely
simply want to use a lower merge factor. Optimizing is very expensive,
and if the index is constantly changing, the slight performance boost
will not last long. The tradeoff is not often worth it for a non static
index.
Given this, it makes a lot more sense to optimize on demand rather than
implicitly when purging a batch, of all things.
From the docs:
Given this, it makes a lot more sense to optimize on demand rather than implicitly when purging a batch, of all things.