# Force merge is not merging all the segments

**URL:** <https://discuss.elastic.co/t/force-merge-is-not-merging-all-the-segments/115966>\
**Category:** Elasticsearch\
**Created:** [January 18, 2018, 3:03am UTC](https://discuss.elastic.co/t/force-merge-is-not-merging-all-the-segments/115966 "2018-01-18T03:03:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticdude](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@elasticdude](https://discuss.elastic.co/u/elasticdude)\
**Post date:** [January 18, 2018, 3:03am UTC](https://discuss.elastic.co/t/force-merge-is-not-merging-all-the-segments/115966/1 "2018-01-18T03:03:50Z")

</div>

Our cluster is configured as follows (This is a AWS managed Elasticservice)

1. 8 data nodes
2. 8 Shards
3. 1 Replica shard

Here is an example of index:

> green open service-logs-2017-12-10 ouyQ9Ew2SQQ 8 1 348663916 12687396 185.6gb 92.8gb

To optimize the search I wanted to merge the segments into one.

Here is the command I used to initiate force merge:

> curl -XPOST \<\>/service-logs-2017-12-10/\_forcemerge?max\_num\_segments=1

Now when I check the number of segments, I still see huge number of segments:

> curl \<\>/\_cat/segments | grep service-logs-2017-12-12 | wc -l  
> OUTPUT: 247

This includes primary and replica but this figure should be 2 after force merge.

Is there something I'm missing here?

---

<div class="post-metadata">

**Author:** ![elasticdude](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@elasticdude](https://discuss.elastic.co/u/elasticdude)\
**Post date:** [January 18, 2018, 10:02pm UTC](https://discuss.elastic.co/t/force-merge-is-not-merging-all-the-segments/115966/2 "2018-01-18T22:02:29Z")

</div>

Looks like there are some problem with AWS, new queries are working. Sorry for the post.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 15, 2018, 10:02pm UTC](https://discuss.elastic.co/t/force-merge-is-not-merging-all-the-segments/115966/3 "2018-02-15T22:02:31Z")

</div>

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