一、改变ES默认深度分页的index.max_result_window 最大窗口值curl
curl -XPUT http://127.0.0.1:9200/my_index/_settings -d ' { "index" : { "max_result_window" : 500000 } }'
二、磁盘阈值ide
curl -XPUT http://127.0.0.1:9200/_cluster/settings -d ' { "transient":{ "cluster.routing.allocation.disk.threshold_enabled":true, "cluster.routing.allocation.disk.watermark.low":"75%", "cluster.routing.allocation.disk.watermark.high":"90gb", "cluster.info.update.interval":"30s" } }'
三、修改副本数量url
curl -XPUT http://127.0.0.1:9200/index/_settings -d ' { "index":{ "number_of_replicas":0 } }'
四、删除索引code
curl -XDELETE http://127.0.0.1:9200/index-`date -d "1 week ago" + '%Y-&m-%d'`
五、aggs多字段聚合索引
curl -XGET 'http://localhost:9200/index/field/_search?pretty' -d '{ "size":0, "aggs":{ "tag1":{ "terms":{ "field":"keyword1", "size":num1 }, "aggs":{ "tag2":{ "terms":{ "field":"keyword2", "size":num2 }, "aggs":{ "tag3":{ "avg":{ "field":"keyword3" } } } } } } } }'