Skip to content

Instantly share code, notes, and snippets.

@gerhard
Created July 4, 2012 10:17
Show Gist options
  • Save gerhard/3046550 to your computer and use it in GitHub Desktop.
Save gerhard/3046550 to your computer and use it in GitHub Desktop.
redis zrevrange different results. Running v2.4.8
redis 127.0.0.1:6379> zrevrange foo 0 -1
1) "1570995626"
redis 127.0.0.1:6379> zrevrange foo 0 -1 WITHSCORES
1) "1570995626"
2) "1341396994"
# Why am I getting different results?
@gerhard
Copy link
Author

gerhard commented Jul 4, 2012

OK, got it:

redis> ZREVRANGE myzset 0 -1
1) "three"
2) "two"
3) "one"
redis> ZREVRANGE myzset 0 -1 WITHSCORES
1) "three"
2) "3"
3) "two"
4) "2"
5) "one"
6) "1"

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