# Restrict num of segments per index

**URL:** <https://discuss.elastic.co/t/restrict-num-of-segments-per-index/46798>\
**Category:** Elasticsearch\
**Created:** [April 8, 2016, 11:36am UTC](https://discuss.elastic.co/t/restrict-num-of-segments-per-index/46798 "2016-04-08T11:36:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deep](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@Deep](https://discuss.elastic.co/u/Deep)\
**Post date:** [April 8, 2016, 11:36am UTC](https://discuss.elastic.co/t/restrict-num-of-segments-per-index/46798/1 "2016-04-08T11:36:34Z")

</div>

Hi,

I recently upgrade to elastic search 1.7.5 and I want to restrict the number of segments per index. By default 20 segments (approx.) get created and it increases the response time of search requests to 40-50 ms.

I use optimize to reduce the number of segments to 1 and then the response time is \< 10 ms.

I tried to update the index settings to set index.merge.policy.segments\_per\_tier=3 but it did not reduce the number of segments.

Any help in the same would be appreciated.

Regards,  
Deep

---

<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 9, 2016, 7:27am UTC](https://discuss.elastic.co/t/restrict-num-of-segments-per-index/46798/2 "2016-04-09T07:27:49Z")

</div>

You cannot do this.

---

<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, 11:01pm UTC](https://discuss.elastic.co/t/restrict-num-of-segments-per-index/46798/3 "2017-07-05T23:01:00Z")

</div>


