默认情况下报错信息:from + size 不能大于10000
{"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10080]. 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."}]......
解决办法:
更新默认的最大数量值
curl -XPUT -H "Content-Type: application/json" http://你的es部署的ip:端口/索引名/_settings -d'{"index" : {"max_result_window" : 10000000}}'
本文解决了Elasticsearch中查询结果窗口过大的问题,当from+size超过默认限制10000时,通过更新设置将最大结果窗口值提高到10000000。
3763

被折叠的 条评论
为什么被折叠?



