In ElasticSearch 2.X you can move shards around using reroute:
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html#cluster-reroute
Other than specifying a move for each shard, is there an easy way to move all off them from one node to another?
Rerouting will not ensure the shards remain in the new node. Elasticsearch may try to balance things out and move some shards back to the original node. If you want to pin the shards to the new node, you need to use Shard Allocation Filtering.
If you want to move all shards of index index1 to node node1, then the command to execute is:
PUT index1/_settings
{
"index.routing.allocation.include._name": "node1"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With