# SEGMENT MERGING

**URL:** <https://discuss.elastic.co/t/segment-merging/192932>\
**Category:** Elasticsearch\
**Created:** [July 30, 2019, 3:11pm UTC](https://discuss.elastic.co/t/segment-merging/192932 "2019-07-30T15:11:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zatom](https://avatars.discourse-cdn.com/v4/letter/z/f0a364/32.png) [@zatom](https://discuss.elastic.co/u/zatom)\
**Post date:** [July 30, 2019, 3:11pm UTC](https://discuss.elastic.co/t/segment-merging/192932/1 "2019-07-30T15:11:32Z")

</div>

I recently reindexed where I had to update docs multiple times and deleted huge amount of docs.  
I see deleted and updated docs are still occupying disk space. From my research so far, force merge of segments is not a good idea since it could create more segments with huge size and could backfire. What can be the safest way to get rid of those unwanted space? Or should I just leave it alone, and over the time it will go away on its own?

Following is the screenshot of my index that has 1 replica. You can see the highlighted part. It is way more  
 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f34429b25bb58cdfb1c8763ca475766cdd7877b.png)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 30, 2019, 4:55pm UTC](https://discuss.elastic.co/t/segment-merging/192932/2 "2019-07-30T16:55:31Z")

</div>

It's not clear what those numbers actually represent, and I'm not familiar with the UI you've taken a screenshot of there. Is it possible that the numbers in brackets are the total of primary plus replica, and the numbers outside the brackets are just the primaries? I ask because 5.51TB is about twice 2.79TB, and also because there's no way to measure the size of documents-that-have-not-been-deleted so that can't be what that 2.79TB is reporting.

But yes, as a rule, you should leave merging alone and let Lucene do its thing.

---

<div class="post-metadata">

**Author:** ![zatom](https://avatars.discourse-cdn.com/v4/letter/z/f0a364/32.png) [@zatom](https://discuss.elastic.co/u/zatom)\
**Post date:** [July 30, 2019, 5:21pm UTC](https://discuss.elastic.co/t/segment-merging/192932/3 "2019-07-30T17:21:31Z")

</div>

Thank you for your response. UI is Elasticsearch Head. Yes, number inside the bracket is primary+replicas

---

<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:** [August 27, 2019, 5:33pm UTC](https://discuss.elastic.co/t/segment-merging/192932/4 "2019-08-27T17:33:37Z")

</div>

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