# Max\_result\_window of all the results saved

**URL:** https://discuss.elastic.co/t/max-result-window-of-all-the-results-saved/347734
**Category:** Elasticsearch
**Created:** [November 22, 2023, 12:59pm UTC](https://discuss.elastic.co/t/max-result-window-of-all-the-results-saved/347734 "2023-11-22T12:59:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bhumika](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@bhumika](https://discuss.elastic.co/u/bhumika)
#### Post date: [November 22, 2023, 12:59pm UTC](https://discuss.elastic.co/t/max-result-window-of-all-the-results-saved/347734/1 "2023-11-22T12:59:29Z")

</div>

{"level":"DEBUG","time":"2023-11-22 12:53:27 +0000","message":" \u001b[1m\u001b[32mUsersIndex Search (106.5ms)\u001b[0m {:index=\>["users"], :body=\>{:size=\>20000, :query=\>{:bool=\>{:must=\>}}}}"}  
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. 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 setting."}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"users","node":"xEGrCaj-S8GtK6eko\_wJVQ","reason":{"type":"illegal\_argument\_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. 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 setting."}}],"caused\_by":{"type":"illegal\_argument\_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. 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 setting.","caused\_by":{"type":"illegal\_argument\_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [20000]. 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 setting."}}},"status":400}  
from /usr/local/bundle/gems/elasticsearch-transport-7.2.1/lib/elasticsearch/transport/transport/base.rb:219:in `\_\_raise\_transport\_error'

Integrated chewy gem of rails to implement elasticsearch in my app.  
i tried to add max\_result\_window in chewy index but not able to execute that.

---

<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: [December 20, 2023, 1:00pm UTC](https://discuss.elastic.co/t/max-result-window-of-all-the-results-saved/347734/2 "2023-12-20T13:00:06Z")

</div>

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