修改es 副本数 replicas

pingyan 2020-05-15

可以用 update-index-settings API 动态修改副本数:

PUT /my_temp_index/_settings
{
    "number_of_replicas": 1
}

curl -XPUT http://192.168.0.200:9200/index_execution_20200414/_settings -d ‘{"number_of_replicas":1}‘

curl -XPUT http://192.168.0.200:9200/index_execution_20200414/_settings -d ‘{"number_of_replicas":0}‘

相关推荐