I am going to optimize my indices daily with automatic tool which will simply call _forcemerge?max_num_segments=1 all indices one by one. During the optimizing, there are still querying and indexing on all indices.
Is it best practice to merge the active index with _forcemerge?max_num_segments=1?
Thanks.
So any approaches to optimize the active index? Our search service must be 24x24 alive and the index is queried and indexed all the time, so cannot close, optimize then open.
_forcemerge is nice for indexes that you know you are done writing to. Otherwise you just continue to make your changes to the index, relying on the background merge process to clean up the deleted documents as it goes.
If we can temporarily stop the indexing, is it OK to do _forcemerge on index which are still being heavily queried?
Per our performance testing, seems _forcemerge has no obvious impact on query. But want to double confirm.
Calling forcemerge on an index you are actively updating will make it
perform better for a short time and then much worse. It is only a good
choice if you aren't going to modify the index again.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.