# ES Query RemoteTransportException, QueryPhaseExecutionException

**URL:** <https://discuss.elastic.co/t/es-query-remotetransportexception-queryphaseexecutionexception/45687>\
**Category:** Elasticsearch\
**Created:** [March 29, 2016, 1:17pm UTC](https://discuss.elastic.co/t/es-query-remotetransportexception-queryphaseexecutionexception/45687 "2016-03-29T13:17:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajmariella](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@ajmariella](https://discuss.elastic.co/u/ajmariella)\
**Post date:** [March 29, 2016, 1:17pm UTC](https://discuss.elastic.co/t/es-query-remotetransportexception-queryphaseexecutionexception/45687/1 "2016-03-29T13:17:04Z")

</div>

When running a query is ES, I try to get results \> 10000 and I get RemoteTransportException nested; QueryPhaseExecutionException[Result window is too large, from + size must be less than or equal to: [10000] but was [10001].  
My query is setup for paging so that I bring back 100 results per page. But when I get \> 10000 I get this error.  
I am doing all this in Java

Any ideas ?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [March 29, 2016, 1:30pm UTC](https://discuss.elastic.co/t/es-query-remotetransportexception-queryphaseexecutionexception/45687/2 "2016-03-29T13:30:33Z")

</div>

> [@ajmariella](#):
>
> Result window is too large

See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max\_result\_window] index level parameter but you shouldn't make it massive. This is one of the things Elasticsearch added in 2.x to guard against running itself out of memory.

---

<div class="post-metadata">

**Author:** ![ajmariella](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@ajmariella](https://discuss.elastic.co/u/ajmariella)\
**Post date:** [March 29, 2016, 1:38pm UTC](https://discuss.elastic.co/t/es-query-remotetransportexception-queryphaseexecutionexception/45687/3 "2016-03-29T13:38:55Z")

</div>

How can I use the scroll API with paging ? If I want to bring back 1000 results per page

---

<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:04pm UTC](https://discuss.elastic.co/t/es-query-remotetransportexception-queryphaseexecutionexception/45687/4 "2017-07-05T23:04:24Z")

</div>


