zrevrangebylex

ZREVRANGEBYLEX

ZREVRANGEBYLEX key max min [LIMIT offset count]

When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between max and min.

Apart from the reversed ordering, ZREVRANGEBYLEX is similar to ZRANGEBYLEX.

Return value

Array reply: list of elements in the specified score range.

Examples

redis> ZADD myzset 0 a 0 b 0 c 0 d 0 e 0 f 0 g (integer) 7 redis> ZREVRANGEBYLEX myzset [c - 1) "c" 2) "b" 3) "a" redis> ZREVRANGEBYLEX myzset (c - 1) "b" 2) "a" redis> ZREVRANGEBYLEX myzset (g [aaa 1) "f" 2) "e" 3) "d" 4) "c" 5) "b"

© 2009–2017 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/zrevrangebylex

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部