ZREMRANGEBYRANK
Syntax
ZREMRANGEBYRANK key start stop
- Available since:
- 2.0.0
- Time complexity:
- O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
- ACL categories:
-
@write
,@sortedset
,@slow
,
移除存储在key
中的有序集合中排名在start
和stop
之间的所有元素。
start
和stop
都是基于0
的索引,其中0
表示分数最低的元素。
这些索引可以是负数,表示从分数最高的元素开始的偏移量。
例如:-1
表示分数最高的元素,-2
表示分数第二高的元素,依此类推。