# Too many Deleted Docs

**URL:** <https://discuss.elastic.co/t/too-many-deleted-docs/84964>\
**Category:** Elasticsearch\
**Created:** [May 8, 2017, 5:54pm UTC](https://discuss.elastic.co/t/too-many-deleted-docs/84964 "2017-05-08T17:54:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ABILASH](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@ABILASH](https://discuss.elastic.co/u/ABILASH)\
**Post date:** [May 10, 2017, 4:28am UTC](https://discuss.elastic.co/t/too-many-deleted-docs/84964/4 "2017-05-10T04:28:11Z")

</div>

Hi @jpountz Thanks a lot for your response.

Please let me know if my understanding is correct, increasing reclaim\_deletes\_weight will favor segments with more deleted docs from the documentation. For the existing segments that have already reached max\_merged\_segment , will they be affected by this setting also?

The reason why I am worried about the deleted documents , is that they are taking up lot of space and I have read these awesome blogs [http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html](http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html) and [https://www.elastic.co/blog/lucenes-handling-of-deleted-documents](https://www.elastic.co/blog/lucenes-handling-of-deleted-documents) by Micheal.

Here are some of the reasons why I am worried about the deleted docs.

We have lot of nested type fields in the elasticsearch mapping which is creating lot of documents for each primary doc we have . We currently have about 20 billion docs(about 3.5 TB with deleted docs, about 2.2 TB without deleted docs ) in the index with 20 primary shards and the data is growing at a rapid pace. I am worried about reaching the 2 billion docs per shard with lot of deleted docs.

In terms of capacity planning , from @mikemccand blogs , it feels like we have to account for 1.5X disk space . One thing that I have read from the blog is that Tiered Merge Policy does not reclaim deleted documents from segments that have already reached max\_merged\_segment size. So I was just wondering for my use case, if it is better to use other merge policies like LogByteSizeMergePolicy to reduce the overall deleted documents ? But if TieredMergePolicy is the way to go, then we will account for the 1.5X disk space in terms of infrastructure.

Please advice.

---

_[View the full topic](https://discuss.elastic.co/t/too-many-deleted-docs/84964)._
