How to use zrangebyscore in the python api

631 views
Skip to first unread message

David Montgomery

unread,
Dec 24, 2012, 6:02:50 AM12/24/12
to redi...@googlegroups.com

Hi,

I want to get all keys and values using zrangebyscore.  If the min value is 10, how do I get all data greater than or equal to 10 in a sorted set with a key called test?

thanks

zrangebyscore('test',start=10,withscores=True)

Andy McCurdy

unread,
Dec 24, 2012, 11:47:05 AM12/24/12
to redi...@googlegroups.com
I think you want:

zrangebyscore('test', min=10, max='+inf', withscores=True)

That will provide all value/score pairs where score >= 10. 

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
Reply all
Reply to author
Forward
0 new messages