# What value to be used for max\_num\_segments for Es 7.9 when we do force merge? is it a permanent change or the segment no will go increasing once we start writing to the index again?

**URL:** https://discuss.elastic.co/t/what-value-to-be-used-for-max-num-segments-for-es-7-9-when-we-do-force-merge-is-it-a-permanent-change-or-the-segment-no-will-go-increasing-once-we-start-writing-to-the-index-again/251839
**Category:** Elasticsearch
**Created:** [October 13, 2020, 4:25am UTC](https://discuss.elastic.co/t/what-value-to-be-used-for-max-num-segments-for-es-7-9-when-we-do-force-merge-is-it-a-permanent-change-or-the-segment-no-will-go-increasing-once-we-start-writing-to-the-index-again/251839 "2020-10-13T04:25:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![GauriA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gauria/32/76841_2.png) [@GauriA](https://discuss.elastic.co/u/GauriA)
#### Post date: [October 13, 2020, 4:25am UTC](https://discuss.elastic.co/t/what-value-to-be-used-for-max-num-segments-for-es-7-9-when-we-do-force-merge-is-it-a-permanent-change-or-the-segment-no-will-go-increasing-once-we-start-writing-to-the-index-again/251839/1 "2020-10-13T04:25:21Z")

</div>

I am upgrading ES 1.4.2 to ES 7.9. For that I had to do remote indexing by re-indexing API to get all the data from old cluster to new cluster. But after re-indexning the search query performance of ES 7.9 got decreased a lot. So I am planning to do forcemerge in order to increase the query performance. Which value should I use for max\_num\_segments if I decide to to forcemerge? there are no guidelines provided. The old cluster have 2 primary shards , one with 18 segments 16 and second with 18 segments. The new cluster after remote indexing has 2 primary shards one with 27 segments and second with 30 segments. Pleased guide me on the value to be used for max\_num\_segments. Thanks

---

<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: [November 10, 2020, 4:25am UTC](https://discuss.elastic.co/t/what-value-to-be-used-for-max-num-segments-for-es-7-9-when-we-do-force-merge-is-it-a-permanent-change-or-the-segment-no-will-go-increasing-once-we-start-writing-to-the-index-again/251839/2 "2020-11-10T04:25:36Z")

</div>

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