# Avoid index ballooning by updates and deletes

**URL:** <https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233>\
**Category:** Elasticsearch\
**Created:** [April 26, 2021, 9:17am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233 "2021-04-26T09:17:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 26, 2021, 9:17am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/1 "2021-04-26T09:17:36Z")

</div>

Hi,  
I'm struggling with having an index that has some fields that are frequently updated and documents that are deleted. I want to avoid ballooning the index for obvious reasons. I tried to go with freezing the index and reindex it, but it seems you can't reindex a frozen (read-only) index, which is weird.  
So I need a solution where I can dispose of the unused documents while it's continuously available for queries. Thankfully, the index isn't huge it's less than 1GB.

Thank you!  
YvorL

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 26, 2021, 9:21am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/2 "2021-04-26T09:21:39Z")

</div>

For an index that small I would imagine that auto merging should keep things in check. Is it not?

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 26, 2021, 10:45am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/3 "2021-04-26T10:45:06Z")

</div>

I don't have that much experience with this type of index. I usually go with daily/monthly ones. I remembered that you can't really delete from an index and updates will create new versions. Also, that you can't force merge active indices. I may have overthought this but I have to be sure that this won't be an issue in production.  
@warkolm could you point me to documentation or a blog post where the auto merging is explained so I know what to expect? I mostly found force merge docs and git issues with auto merging when I googled it.  
Thank you!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 26, 2021, 10:12pm UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/4 "2021-04-26T22:12:19Z")

</div>

Let me counter that by asking - what do you mean by ballooning here? What are you seeing that has you worried?

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 27, 2021, 9:25am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/5 "2021-04-27T09:25:10Z")

</div>

My inexperience 🙂 As I mentioned, I don't have any experience with continuously updated indices and I always think of the worst. For example, if every doc in the index is updated X times (4-10) in a day it'll double its size very quickly and performance drops.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 27, 2021, 11:55pm UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/6 "2021-04-27T23:55:18Z")

</div>

I think you're worrying about nothing worth worrying about.

An updated document will delete the original, but merging will get rid of it. You won't have massive size increases.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 28, 2021, 8:43am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/7 "2021-04-28T08:43:48Z")

</div>

Thank you!

---

<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:** [May 26, 2021, 8:44am UTC](https://discuss.elastic.co/t/avoid-index-ballooning-by-updates-and-deletes/271233/8 "2021-05-26T08:44:06Z")

</div>

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