Aidar Kamalov
2018-10-23 09:02:04 UTC
Hello,
I have a number, for example 1222333.
And I have three data fields - destination, provider, cost. Destinations is
begining of number for example:
1222, prov-1, 0.05
12, prov-2, 0.12
12, prov-3, 0.1
Is it possible by redis to get sorted low cost?
I tried to do:
zadd 1222 0.05 prov-1
zadd 12 0.12 prov-2
zadd 12 0.1 prov-3
And then I try to get low cost for number 1222333:
zrangebyscore 12 0 1
But I should know destination 12 :(
Is there any way in redis to query full number and get values?
I have a number, for example 1222333.
And I have three data fields - destination, provider, cost. Destinations is
begining of number for example:
1222, prov-1, 0.05
12, prov-2, 0.12
12, prov-3, 0.1
Is it possible by redis to get sorted low cost?
I tried to do:
zadd 1222 0.05 prov-1
zadd 12 0.12 prov-2
zadd 12 0.1 prov-3
And then I try to get low cost for number 1222333:
zrangebyscore 12 0 1
But I should know destination 12 :(
Is there any way in redis to query full number and get values?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.