解决elasticsearch超过10000条无法查询的问题

来源:互联网 发布:appserv的端口 编辑:程序博客网 时间:2024/06/06 01:06

我用from&size的方法进行分页查询,每次超过10000条的时候就会报错,(’Result window is too large, from + size must be less than or equal to: [10000] but was [10100]. 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.’)网上说要设置index.max_result_window,但是找了许多都没说明具体怎么设置,最后通过各种搜索,找到一种解决方法,具体操作方法如下:
1.首先在ES的head中关闭索引
这里写图片描述
2.在复合查询中设置max_result_window的最大索引值,以put方式提交
info/_settings?preserve_existing=true
{
“max_result_window” : “2000000000”
}
3.点击提交,在概览中将索引打开即可!

阅读全文
0 0
原创粉丝点击