# Will these small segments got merged eventually?

**URL:** https://discuss.elastic.co/t/will-these-small-segments-got-merged-eventually/63038
**Category:** Elasticsearch
**Created:** [October 14, 2016, 8:46am UTC](https://discuss.elastic.co/t/will-these-small-segments-got-merged-eventually/63038 "2016-10-14T08:46:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![makeyang](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@makeyang](https://discuss.elastic.co/u/makeyang)
#### Post date: [October 14, 2016, 8:46am UTC](https://discuss.elastic.co/t/will-these-small-segments-got-merged-eventually/63038/1 "2016-10-14T08:46:27Z")

</div>

set max\_merged\_segment to 5gb  
set shard\_index\_buffer\_size to 5gb  
set refresh to -1.  
then most of the shard won't need to merge anymore.  
and for sometime, manually refresh some shard. so the shard will be:  
5gb, 5gb, 1mb, 5gb, 5gb, 2mb...  
will these small segments got merged eventually?

---

<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: [October 14, 2016, 9:31am UTC](https://discuss.elastic.co/t/will-these-small-segments-got-merged-eventually/63038/2 "2016-10-14T09:31:48Z")

</div>

`shard_index_buffer_size` applies to indexing, not merging.  
`merged_segment` only applies to 1.X.

But as long as you aren't playing with merging settings, which you shouldn't need to do in 2.X, then yes, things will automatically merge.

---

<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: [July 5, 2017, 10:12pm UTC](https://discuss.elastic.co/t/will-these-small-segments-got-merged-eventually/63038/3 "2017-07-05T22:12:20Z")

</div>


