Was wondering if I could get some clarity on the following issue:
We are using ES 2.3.3, and have some indices that are no longer being written into. We went ahead and executed a force merge on those indices setting the max number of segments to 1. The API returns a success, however nothing happens. Viewing the _cat API we can confirm that the same number of segments exist post the merge.
Is my assumption that segments should equal 1 correct, or am I missing something.
If you want to see if the force merge is running then execute:
GET _nodes/hot_threads
You'll see an output like:
1.0% (4.8ms out of 500ms) cpu usage by thread 'elasticsearch[es2-data1][force_merge][T#1]'
10/10 snapshots sharing following 18 elements
java.lang.Object.wait(Native Method)
org.apache.lucene.index.IndexWriter.doWait(IndexWriter.java:4303)
org.apache.lucene.index.IndexWriter.forceMerge(IndexWriter.java:1787)
Don't run a force merge on any index you currently or plan to write to. The index should be effectively "read only". If you run it on an index which your indexing to then its likely you'll end up with more segments.
Thanks for the reply. I can confirm I am no longer indexing into the index. I also checked the hot threads and don't ever see a thread for force_merge. The fact that I do not have a single segment is still a bit head scratching.
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.