ZREVRANGEBYLEX

Since 1.1.0Sorted sets

Syntax

ZREVRANGEBYLEX key max min [LIMIT offset count]
  • Flags: readonly
  • ACL categories: @read, @slow, @sortedset
  • Arity: -4

ZRANGEBYLEX in reverse order; max comes first.

Examples

> ZADD lx 0 apple 0 banana 0 cherry 0 date
(integer) 4
> ZREVRANGEBYLEX lx + [b
1) "date"
2) "cherry"
3) "banana"