Cherry
Cherry

Reputation: 33618

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: 4441

Answers (1)

Andrei Stefan
Andrei Stefan

Reputation: 52366

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