How keys should be designed in a Key-Value Store?
For example if there is a need for querying users based on their emails (a manual secondary index), should the key be
If so, what hash algorithm should be used? Is there a sequential hash algorithm for hashing strings that preserves the sequence? (in case we need to sort strings)
:id should be added at the end - this is just for demonstration purpose.