ZREVRANGEBYLEX (已弃用)
截至Redis版本6.2.0,此命令被视为已弃用。
在迁移或编写新代码时,可以使用带有REV
和BYLEX
参数的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
的所有元素,其值介于max
和min
之间。
除了顺序相反外,ZREVRANGEBYLEX
与 ZRANGEBYLEX
类似。