# ElasticSearch ForceMerge

**URL:** https://discuss.elastic.co/t/elasticsearch-forcemerge/65677
**Category:** Elasticsearch
**Created:** [November 10, 2016, 2:36pm UTC](https://discuss.elastic.co/t/elasticsearch-forcemerge/65677 "2016-11-10T14:36:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mike\_giardinelli](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@mike\_giardinelli](https://discuss.elastic.co/u/mike_giardinelli)
#### Post date: [November 10, 2016, 2:36pm UTC](https://discuss.elastic.co/t/elasticsearch-forcemerge/65677/1 "2016-11-10T14:36:39Z")

</div>

Hi all, we are running ES 2.3 and have indexes that are no longer being written to. Those indexes have what a appear to be a lot of segments and deletes. I wanted to try and "optimize" them for search, now that they no longer have docs being written to them. However, when i used the force merge and force merge with expunge deletes, I am not seeing it do anything.

Example Index:  
170M docs  
~500 GB  
268 segments  
~15M deleted docs

Wanted to try and reduce the #segments and cleanup the old deletes.

---

<div class="post-metadata">

### Author: ![bhatch](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bhatch](https://discuss.elastic.co/u/bhatch)
#### Post date: [November 10, 2016, 4:56pm UTC](https://discuss.elastic.co/t/elasticsearch-forcemerge/65677/2 "2016-11-10T16:56:23Z")

</div>

Try setting max\_num\_segments equal to 1 when you do the forcemerge.

---

<div class="post-metadata">

### Author: ![mike\_giardinelli](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@mike\_giardinelli](https://discuss.elastic.co/u/mike_giardinelli)
#### Post date: [December 8, 2016, 4:16pm UTC](https://discuss.elastic.co/t/elasticsearch-forcemerge/65677/3 "2016-12-08T16:16:13Z")

</div>

Thanks man. I will give that a try.

---

<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: [January 5, 2017, 4:16pm UTC](https://discuss.elastic.co/t/elasticsearch-forcemerge/65677/4 "2017-01-05T16:16:26Z")

</div>

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