# Force merge elasticsearch

**URL:** https://discuss.elastic.co/t/force-merge-elasticsearch/131701
**Category:** Elasticsearch
**Created:** [May 14, 2018, 9:07am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701 "2018-05-14T09:07:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Hanen](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@Hanen](https://discuss.elastic.co/u/Hanen)
#### Post date: [May 14, 2018, 9:07am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701/1 "2018-05-14T09:07:06Z")

</div>

Hi everyone,

I have a cluster with 6 nodes elasticsearch( 1 master node and 5 data nodes) and I have a very important number of documents.

I would like to reduce this number using Force Merge.

please how can I do it.

many thanks.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [May 14, 2018, 9:22am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701/2 "2018-05-14T09:22:43Z")

</div>

You can not reduce the number of documents by running a force merge.

---

<div class="post-metadata">

### Author: ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)
#### Post date: [May 14, 2018, 9:28am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701/3 "2018-05-14T09:28:06Z")

</div>

Where forcemerge can help is if you have deleted documents that are no longer required and you want to reclaim that disk space. If this is what you are looking for, you must first delete the data that you no longer need (`_delete_by_query` can be useful for this) and then do a `_forcemerge` on the index.

---

<div class="post-metadata">

### Author: ![Hanen](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@Hanen](https://discuss.elastic.co/u/Hanen)
#### Post date: [May 14, 2018, 9:31am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701/4 "2018-05-14T09:31:44Z")

</div>

Thanks for your replay,

could you please mention which configurations we should go through to realize that?  
Thanks in advance!

---

<div class="post-metadata">

### Author: ![Hanen](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@Hanen](https://discuss.elastic.co/u/Hanen)
#### Post date: [May 14, 2018, 9:32am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701/5 "2018-05-14T09:32:22Z")

</div>

Many thanks @rcowart!!

---

<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: [June 11, 2018, 9:32am UTC](https://discuss.elastic.co/t/force-merge-elasticsearch/131701/6 "2018-06-11T09:32:24Z")

</div>

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