# Impact of increasing index.max\_result\_window size to 10 million?

**URL:** <https://discuss.elastic.co/t/impact-of-increasing-index-max-result-window-size-to-10-million/277241>\
**Category:** Elasticsearch\
**Created:** [June 28, 2021, 2:26pm UTC](https://discuss.elastic.co/t/impact-of-increasing-index-max-result-window-size-to-10-million/277241 "2021-06-28T14:26:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![StringerBell](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@StringerBell](https://discuss.elastic.co/u/StringerBell)\
**Post date:** [June 28, 2021, 2:26pm UTC](https://discuss.elastic.co/t/impact-of-increasing-index-max-result-window-size-to-10-million/277241/1 "2021-06-28T14:26:47Z")

</div>

I have a scenario where I want to increase the `index.max_result_window` size to about 10 million. My query only cares about fetching the sort order and not the actual `_source` field.  
Does changing the max\_result\_window size to \> 10, 000 has any side effects on performance on ElasticSearch in non search operations like ingesting, aggregations etc?

---

<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:** [June 29, 2021, 1:50am UTC](https://discuss.elastic.co/t/impact-of-increasing-index-max-result-window-size-to-10-million/277241/2 "2021-06-29T01:50:13Z")

</div>

Welcome to our community! 😃

It's likely to put extra pressure on your heap if you need to get that many results.  
As [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/index-modules.html) note;

> See [Scroll](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/paginate-search-results.html#scroll-search-results) or [Search After](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/paginate-search-results.html#search-after) for a more efficient alternative to raising this.

---

<div class="post-metadata">

**Author:** ![StringerBell](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@StringerBell](https://discuss.elastic.co/u/StringerBell)\
**Post date:** [July 4, 2021, 1:34pm UTC](https://discuss.elastic.co/t/impact-of-increasing-index-max-result-window-size-to-10-million/277241/3 "2021-07-04T13:34:24Z")

</div>

Hi, thank you for the reply. However, I have a case of moving to previous pages, my concern is that search\_after might become invalid if new docs are added/removed from the index.  
Also elastic doesn't give a search\_before functionality, so I had a hacky way of moving backwards but that requires me to explore increasing the index.max\_result\_window to greater than default limit of 10k.

Is there any clean way of moving backwards that you might be able to guide me with?

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:** [August 1, 2021, 1:34pm UTC](https://discuss.elastic.co/t/impact-of-increasing-index-max-result-window-size-to-10-million/277241/4 "2021-08-01T13:34:47Z")

</div>

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