Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

update zset results in inspection to show scores #8

wants to merge 1 commit into


None yet
2 participants

srj55 commented Sep 6, 2012

added feature to improve inspection of ZSETs by including scores in the tuple results.


ionelmc commented Sep 10, 2012


Thanks for the patch but I'm pretty sure this doesn't actually work. In redis-py the signature is:

zrevrangebyscore(name, max, min, start=None, num=None, withscores=False, score_cast_func=float)

This means it's called in the wrong way and (I've checked this) "ZREVRANGEBYSCORE myzset 0 -1 WITHSCORES" won't return anything - it needs to be called like this: "ZREVRANGEBYSCORE myzset +inf -inf WITHSCORES". On the other hand pagination won't work anyway with scores.

Did you actually want only to see the scores ("ZRANGE key start stop WITHSCORES") ?

srj55 commented Sep 17, 2012

I will have to investigate this further. When you say you're "pretty sure this doesn't work", do you mean you've tested this out?

The patch I submitted works fine in my environment. The reverse range was added as a convenience for sorting, but it should be an option (use ZRANGE as a default).

However, the WITHSCORES is primarily what I'm after with this patch. Also, pagination is working with the scores in my environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment