I'm trying to implement some bitwise operation on keys in redis. I have to store let's say key value 12:CA foo 12:US bar 42:CA tag
And I'm trying to be able to query all with CA or all with 12 Is this even possible ?
Thanks
I may be mis-interpreting the question, but if you have key => values like
12:CA => foo
12:US => bar
42:CA => tag
And you want to pull all keys matching CA, or 12, then you can just use the keys operator along with a wildcard
keys *:CA
keys 12:*
NOTE This only returns the matching keys. To get the values, you need to use the returned keys.