记一次修改ES-max_result_window

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

curl -XPUT 192.168.46.128:9200/index-test/_settings -d ‘{ “index.max_result_window” :“1000000”}’

成功返回:

{"acknowledged":true}

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

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

curl -XGET 192.168.46.128:9200/index-test/_settings

返回:

{
    "index-test": {
        "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

你可能感兴趣的:(ELK,oracle,linux,数据库)