zrevrangebyscore key max min [withscores] [limit offset count]
注意: 该命令在redis2.2.0版本之后才有。 命令演示:
127.0.0.1:6379> zrangebyscore rank -inf +inf withscores 1) "zhangsan" 2) "8" 3) "wangwu" 4) "9" 5) "zhaoliu" 6) "11" 7) "lisi" 8) "12" 127.0.0.1:6379> zrevrangebyscore rank +inf -inf 1) "lisi" 2) "zhaoliu" 3) "wangwu" 4) "zhangsan" 127.0.0.1:6379> 127.0.0.1:6379> 127.0.0.1:6379> zrevrangebyscore rank +inf -inf withscores limit 0 2 1) "lisi" 2) "12" 3) "zhaoliu" 4) "11" 127.0.0.1:6379>