ES 2.3.3 Force merge not merging?


Hi there,

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.

Thanks in advance.

(cheruvian) #2

Unfortunately we've seen that force merges can take hours to complete.

There also doesn't appear to be good progress or status tracking of the merge.

I just posted about this here

Another thing to watch out for is that apparently merges are not throttled and can consume many resources on a node which we have seen (ref:



Thanks for the quick response. I did see your post, but didn't put two and two together (thought it was blocking) via the API.

Will check back in a bit on the cluster and see whats up.


(Mike Simos) #4


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)

If you don't see this running then its completed.


Would there be any reason a force merge completed, however I have more than one segment?

(Mike Simos) #6

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.

(Mike Simos) #8


Make sure you use:

POST /twitter/_forcemerge?max_num_segments=1


I'm seeing the same behavior on 5.0.1. Despite setting max_num_segments=1 I end up with two segments.


How many shards in the index? It will merge the max_num per shard.


Thanks Mike, the issue was max_num_segments as a url param as opposed to a body param, which was using the default (bit misleading)

(system) #13

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.