背景介绍
我们在 Elasticsearch
API的基础上实现了一个日志查询系统,支持最基本的时间范围选择以及关键词搜索高亮,并且日志展示的表格支持异步分页。
有天用户反馈,查询的时候页面报错
Result window is too large, from + size must be less than or equal to: [10000] but was [24600]. 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 setting.
这是因为我们的异步分页查询逻辑中使用了 from
+ size
,而 Elasticsearch
默认配置为
“max_result_window”: “10000”
于是, 将这个参数调至 30000, 问题暂时解决。
不过,今天又接到反馈,API报错
Result window is too large, from + size must be less than or equal to: [30000] but was [44600]. 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 setting.
</