Shard routing calc

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

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

No, it'll be a lot less work.

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