【Elasticsearch】常见问题汇总——持续更新

分页

结果起点超过结果窗口

Caused by: QueryPhaseExecutionException[Result window is too large, 
from + size must be less than or equal to: [10000] but was [10020]. 
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.]

原因

ES默认的index.max_result_window值是10000

解决方法

方法1 增加指定index的max_result_window
方法2 在elasticsearch.yml中设置全局index.max_result_window
方法3 分页使用ES的scroll api实现

参考:https://stackoverflow.com/questions/41677198/result-window-is-too-large-from-size-must-be-less-than-or-equal-to-10000-b

你可能感兴趣的:(Elasticsearch)