elasticsearch的默认result Window是10000,如果返回的size超过这个值,则会报错:
[Result window is too large, from + size must be less than or equal to: [10000] but was [100000].
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.] and i am not getting in which file we have to set
解决方法如下:
curl -XPUT "http://localhost:9200/my_index/_settings" -d '{ "index" : { "max_result_window" : 500000 } }'
或者在elasticsearch.yml中添加:
index.max_result_window = 500000;