# Index.max\_result\_window - not working

**URL:** https://discuss.elastic.co/t/index-max-result-window-not-working/130509
**Category:** Elasticsearch
**Created:** [May 3, 2018, 6:06pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509 "2018-05-03T18:06:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![pamamolf](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@pamamolf](https://discuss.elastic.co/u/pamamolf)
#### Post date: [May 3, 2018, 6:06pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/1 "2018-05-03T18:06:37Z")

</div>

Hello

I am getting this error on latest version of elastic:

`Result window is too large, from + size must be less than or equal to: [10000] but was [2039925].`

so i was try to add at the elasticsearch.yml configuration file at the end this:

`index.max_result_window	= 5000000;`

but then elastic search refuse to start with error elasticsearch[1800]: in 'reader', line 90, column 1:

and that line is the one that i was add...

I know it may be not the best way to solve this but why it doesn't accept it?

Thank you

---

<div class="post-metadata">

### Author: ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)
#### Post date: [May 3, 2018, 8:18pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/2 "2018-05-03T20:18:37Z")

</div>

Yaml files use colons instead of equal signs, and no semi-colons at the end. Try this:

`index.max_result_window: 5000000`

Do note that the setting is there for a reason. It protects your cluster from abusively large search requests. 5,000,000 is certainly an abusively large request and will likely hurt the performance of your cluster, potentially even crashing it.

If you need large result sets, you should scan scroll over the data instead.

---

<div class="post-metadata">

### Author: ![pamamolf](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@pamamolf](https://discuss.elastic.co/u/pamamolf)
#### Post date: [May 4, 2018, 12:27pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/4 "2018-05-04T12:27:43Z")

</div>

it doesn't work....

> [WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]  
> org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: node settings must not contain any index level settings

---

<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: [May 4, 2018, 12:40pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/5 "2018-05-04T12:40:25Z")

</div>

This is an index setting not a node setting.

---

<div class="post-metadata">

### Author: ![pamamolf](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@pamamolf](https://discuss.elastic.co/u/pamamolf)
#### Post date: [May 4, 2018, 12:55pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/6 "2018-05-04T12:55:54Z")

</div>

How can i increase it then?

---

<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: [May 4, 2018, 1:06pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/7 "2018-05-04T13:06:37Z")

</div>

Using the update index settings API. [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html)

---

<div class="post-metadata">

### Author: ![pamamolf](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@pamamolf](https://discuss.elastic.co/u/pamamolf)
#### Post date: [May 4, 2018, 1:27pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/8 "2018-05-04T13:27:08Z")

</div>

something like this?

curl -XPUT "[http://localhost:9200/my\_index/\_settings](http://localhost:9200/my_index/_settings)" -d '{ "index" : { "max\_result\_window" : 5000000 } }'

if yes it will survive elastic restarts/reinstallations or system restarts?

Thank you

---

<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: [May 4, 2018, 1:39pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/9 "2018-05-04T13:39:29Z")

</div>

Yes.

It will survive a restart, yes.

> 5000000

But I don't think you should do that. You are going to have memory issues, and super slow response time if you search fro something like:

```
"from": 4999990,
"size": 10

```

More at [Index modules | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings)

---

<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 1, 2018, 1:39pm UTC](https://discuss.elastic.co/t/index-max-result-window-not-working/130509/10 "2018-06-01T13:39:29Z")

</div>

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