现象:
ES默认返回数据量为10000条, 当分页的from超过10000条的时候,es就会如下报错:
Result window is too large, from + size must be less than or equal to:[10000] but was [10500]. See the scroll api for a more efficient way to requestlarge data sets. This limit can be set by changing the[index.max_result_window] index level parameter
解决方案:
curl -XPUT http://es-ip:9200/_settings -d '{ "index" : { "max_result_window" : 100000000}}
可使用postman来调用。