# Result window is too large Error

**URL:** <https://discuss.elastic.co/t/result-window-is-too-large-error/237941>\
**Category:** Elasticsearch\
**Created:** [June 21, 2020, 1:29am UTC](https://discuss.elastic.co/t/result-window-is-too-large-error/237941 "2020-06-21T01:29:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![skv325](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@skv325](https://discuss.elastic.co/u/skv325)\
**Post date:** [June 21, 2020, 1:30am UTC](https://discuss.elastic.co/t/result-window-is-too-large-error/237941/1 "2020-06-21T01:30:00Z")

</div>

Hello,  
I am getting an error message when doing paged search from kendo data grid on elasticsearch:  
"Result window is too large, from + size must be less than or equal to: [10000] but was [44800]..."

The index has approx 45,000 docs and page size is set to 100 so there are 448 pages.  
I am not reading all records from elasticsearch, instead using paging.  
This error occurs when i read last page. Why do I have this error and how to resolve the problem?  
Thank you

---

<div class="post-metadata">

**Author:** ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)\
**Post date:** [June 21, 2020, 2:19am UTC](https://discuss.elastic.co/t/result-window-is-too-large-error/237941/2 "2020-06-21T02:19:59Z")

</div>

Hi @skv325

Check this topic there's already a reply about your error and how to solve it.

> [@Result window is too large, from + size must be less than or equal to: \[10000\] but was \[11001\]](https://discuss.elastic.co/t/result-window-is-too-large-from-size-must-be-less-than-or-equal-to-10000-but-was-11001/63070/4):
>
> May be. May be not that longer that you can imagine. I think it's wrong. The opposite is true. I mean that loading on the coordinated node 10k docs instead of 1m of docs for example will consume much less memory. Once you get back 10k docs in your application, just stream them to the other process/destination you want. What kind of error? You mean elasticsearch does not work anymore? Then you need to fix the root of the problem not trying to work around it. I think you are talking about so…

And here the documentation about pagination if you want to read more about:

> **[Pagination | Elasticsearch: The Definitive Guide \[2.x\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html)**

There's more explanation on stackoverflow and on this forum if you search about your error:

> <https://stackoverflow.com/questions/35206409/elasticsearch-2-1-result-window-is-too-large-index-max-result-window/35221900#35221900>

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 21, 2020, 6:18am UTC](https://discuss.elastic.co/t/result-window-is-too-large-error/237941/3 "2020-06-21T06:18:22Z")

</div>

You can use:

- the [`size` and `from` parameters](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html) to display by default up to 10000 records to your users. If you want to change this limit, you can change `index.max_result_window` setting but be aware of the consequences (ie memory).
- the [search after](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-after.html) feature to do deep pagination.
- the [Scroll API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html) if you want to extract a resultset to be consumed by another tool later.

---

<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 19, 2020, 6:18am UTC](https://discuss.elastic.co/t/result-window-is-too-large-error/237941/4 "2020-07-19T06:18:24Z")

</div>

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