# Max\_result\_window ignored

**URL:** <https://discuss.elastic.co/t/max-result-window-ignored/133329>\
**Category:** Elasticsearch\
**Created:** [May 25, 2018, 2:02pm UTC](https://discuss.elastic.co/t/max-result-window-ignored/133329 "2018-05-25T14:02:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ney](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@ney](https://discuss.elastic.co/u/ney)\
**Post date:** [May 25, 2018, 2:02pm UTC](https://discuss.elastic.co/t/max-result-window-ignored/133329/1 "2018-05-25T14:02:52Z")

</div>

I'm using Elasticsearch 2.4.6. I've changed index.max\_result\_window to a lower number, but ES keeps returning everything that matches. Is there another way to limit the number of results?

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [May 29, 2018, 2:47am UTC](https://discuss.elastic.co/t/max-result-window-ignored/133329/2 "2018-05-29T02:47:58Z")

</div>

That setting controls the limit for `from + size` parameters of a query. If you want to change the count of documents a query returns you need to change the `size` parameter of a query (defaults to `10`)

---

<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 26, 2018, 2:47am UTC](https://discuss.elastic.co/t/max-result-window-ignored/133329/3 "2018-06-26T02:47:58Z")

</div>

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