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;
相關文章
相關標籤/搜索