How to restrict shard and replica to specific node

Hello? I'm newbie to Elasticsearch.

Consider there are 1 master nodes and 6 data nodes(A,B,C,D,E,F).

I'd like to put 'log_a' index's shard and replica to first three nodes(A,B,C).
I'd like to put 'lob_b' index's shard and replica to other nodes(D,E,F).

Is this scenario possible?
If it is, then how can I implement it?

I just want to allocate specific index's shard(primary and replica) and replica to specific set of nodes.

You can use allocation filtering to do this. However it won't distinguish between primary and replica.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.