Shard routing calc


(Morphers82) #1

This formula is given for how a doc is routed to a shard.
shard_num = hash(_routing) % num_primary_shards

I would like to calculate this to recover a shard that was lost so i can reindex docs that were deleted along with it. I use php to update docs and this index I use my own id's, so I just need to know the hash I can use in php to do this.
Thanks


(Mark Walkom) #2

I would just reindex everything, it's going to be more work the other way.


(Morphers82) #3

No, it'll be a lot less work.


(system) #4

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