# Impact of setting max\_inner\_result\_window at index level

**URL:** <https://discuss.elastic.co/t/impact-of-setting-max-inner-result-window-at-index-level/273128>\
**Category:** Elasticsearch\
**Created:** [May 17, 2021, 6:20am UTC](https://discuss.elastic.co/t/impact-of-setting-max-inner-result-window-at-index-level/273128 "2021-05-17T06:20:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![surabhi11](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@surabhi11](https://discuss.elastic.co/u/surabhi11)\
**Post date:** [May 17, 2021, 6:20am UTC](https://discuss.elastic.co/t/impact-of-setting-max-inner-result-window-at-index-level/273128/1 "2021-05-17T06:20:02Z")

</div>

Hi,

We have a user index and it has recipients (nested object).  
Since recipients are saved in User domain as nested object, so in order to pull the recipients data with pagination we are using inner\_hits query in respective API codebase.

The solution provided in the error message suggests changing the "index.max\_inner\_result\_window" setting.  
But while going through some documentation found that this change would have a performance hit.

Kindly provide the recommendation to fix below issue?

**Issue:**  
When we reach the page no 3, the from value will be 100 and size =50 (considering default page size which is 50), the ES gives below error message -

{  
"type": "illegal\_argument\_exception",  
"reason": "Inner result window is too large, the inner hit definition's [null]'s from + size must be less than or equal to: [100] but was [150]. This limit can be set by changing the [index.max\_inner\_result\_window] index level setting."  
}

In order to fix the error message, it is suggesting us to change the index level setting’s [index.max\_inner\_result\_window] to support more than 100 records.

Thanks,  
Surabhi Singh

---

<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:** [June 14, 2021, 6:20am UTC](https://discuss.elastic.co/t/impact-of-setting-max-inner-result-window-at-index-level/273128/2 "2021-06-14T06:20:31Z")

</div>

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