I can see that it is possible to allocate shards to particular nodes, and (some) routing of data is also possible, but... how can I ensure that data will always end up in their own shard?
I have 3 nodes with 2 shards in each node.
[P0 R2] [P1 R0] [P2 R1]
From documentation I know that:
shard_num = hash(_routing) % num_primary_shards
I want to route bucket1's data... The hash of (bucket1) = 9; 9 % 3 = 0, so this data goes to P0.
Then, I want to route bucket2's data... The hash of (bucket2) = 33; 33 % 3 = 0, so this data goes to P0 too.
Any ideas if there is a way around it?