Index.max_result_window - not working


(Dimitris) #1

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


(Zachary Tong) #2

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.


(Dimitris) #4

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


(David Pilato) #5

This is an index setting not a node setting.


(Dimitris) #6

How can i increase it then?


(David Pilato) #7

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


(Dimitris) #8

something like this?

curl -XPUT "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


(David Pilato) #9

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 https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#dynamic-index-settings


(system) #10

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