elasticsearch修改返回窗口的大小

elasticsearch的默认result Window是10000,若是返回的size超过这个值,则会报错:api

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

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 setless

解决方法以下:curl

curl -XPUT "http://localhost:9200/my_index/_settings" -d '{ "index" : { "max_result_window" : 500000 } }'

或者在elasticsearch.yml中添加:elasticsearch

index.max_result_window = 500000;
相关文章
相关标签/搜索