es设置max_result_window

es设置index.max_result_window(就是from+size,默认大小10000),可通过如下方式修改:

curl -XPUT 192.168.40.31:9200/datasmart/_settings -d '{ "index.max_result_window" :"1000000"}'

成功返回:

{"acknowledged":true}

这个请求只会对datasmart这个索引起作用,如果是设置所有索引,把datasmart改成_all即可

查询当前max_result_window把PUT改成GET,如:

curl -XGET 192.168.40.31:9200/datasmart/_settings

返回:

{
    "datasmart": {
        "settings": {
            "index": {
                "number_of_shards": "3",
                "provided_name": "datasmart",
                "max_result_window": "1000000",
                "creation_date": "1506303097464",
                "analysis": {
                    "analyzer": {
                        "default": {
                            "type": "smartcn"
                        }
                    }
                },
                "number_of_replicas": "1",
                "uuid": "84ufzn8nQ1-InuxYGHj_IA",
                "version": {
                    "created": "5050199"
                }
            }
        }
    }
}

这个设置是索引层的,即便是使用_all设置了,看日志也是对逐个索引加这个配置,后续新加的索引,max_result_window默认还是1w

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容