0
点赞
收藏
分享

微信扫一扫

使用elasticsearch分页时报max_result_window is too large的错误解决方案

第一种:

curl -H "Content-Type: application/json" -XPUT 'http://127.0.0.1:9200/_all/_settings?preserve_existing=true' -d '{ "index.max_result_window" : "1000000000" }'

或者

curl -H "Content-Type: application/json" -XPUT http://127.0.0.1:9200/_settings -d '{ "index" : { "max_result_window" : 100000000}}'

  • 设置max_result_window参数(使用PUT命令),在Kibana界面-->左侧导航Dev Tools-->右侧Console选项卡,执行下面的内容,写完后点击右侧运行(播放按钮)

PUT trans/_settings { "index":{ "max_result_window":"设置查询的条数,默认1W条" } }


 【结果】

第二种:

在config/elasticsearch.yml文件中的最后加上index.max_result_window: 100000000,但是这种方法要注意在最前面加上空格

举报

相关推荐

0 条评论