curl -X PUT "192.168.1.101:9200/索引名称/_settings?pretty" -H 'Content-Type: application/json' -d'
{
"number_of_replicas": 0
}
'
上线
curl -XPOST 'localhost:9200/_cluster/reroute?pretty' -H 'Content-Type: application/json' -d'
{
"commands" : [
{
"allocate_replica" : {
"index" : "fragment", "shard" : 0,
"node" : "node-102-new-0"
}
},{
"allocate_replica" : {
"index" : "fragment", "shard" : 1,
"node" : "node-103-new-0"
}
},{
"allocate_replica" : {
"index" : "fragment", "shard" : 2,
"node" : "node-100-new-0"
}
}
]
}
'