Cherry
Cherry

Reputation: 33514

How disable shard relocation between nodes for one index?

I need that elasticsearch creates index shards once and do not relocates existing shard from nodes untill it receives manual command for that. Is it possible to do that without disabling shard allocation for whole cluster?

Upvotes: 2

Views: 4434

Answers (1)

Andrei Stefan
Andrei Stefan

Reputation: 52368

Yes, it's called index.routing.allocation.enable and can be run for a single index and it's dynamically updateable:

PUT /my_index/_settings
{
    "index" : {
        "routing.allocation.enable" : "none"
    }
}

Upvotes: 3

Related Questions