elasticsearch dynamically modify the number of copies

Create only one main fragment, not a copy of a small index:

PUT /my_temp_index
{
    "settings": {
        "number_of_shards" :   1,
        "number_of_replicas" : 0
    }
}

It can dynamically modify the number of copies with update-index-settings API:

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

 

Guess you like

Origin www.cnblogs.com/gavinYang/p/11199877.html