ZREVRANGEBYLEX (已弃用)

截至Redis版本6.2.0,此命令被视为已弃用。

在迁移或编写新代码时,可以使用带有REVBYLEX参数的ZRANGE来替换它。

Syntax
ZREVRANGEBYLEX key max min [LIMIT offset count]
Available since:
2.8.9
Time complexity:
O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
ACL categories:
@read, @sortedset, @slow,

当排序集中的所有元素都以相同的分数插入时,为了强制按字典顺序排序,此命令返回排序集中位于key的所有元素,其值介于maxmin之间。

除了顺序相反外,ZREVRANGEBYLEXZRANGEBYLEX 类似。

示例

ZADD myzset 0 a 0 b 0 c 0 d 0 e 0 f 0 g ZREVRANGEBYLEX myzset [c - ZREVRANGEBYLEX myzset (c - ZREVRANGEBYLEX myzset (g [aaa

RESP2 回复

Array reply: a list of members in the specified score range.

RESP3 回复

Array reply: List of the elements in the specified score range.
RATE THIS PAGE
Back to top ↑