ZLEXCOUNT
Since 1.1.0Sorted sets
Syntax
ZLEXCOUNT key min maxCounts the members of the sorted set at key between min and max in lexicographical order. It is meant for sets whose members all have the same score. A bound starts with [ (included) or ( (excluded); - and + are the open ends.
Reply
- The count.
ERR min or max not valid string range itemif a bound has no[or(.
Examples
> ZADD lx 0 apple 0 banana 0 cherry 0 date
(integer) 4
> ZLEXCOUNT lx [b [d
(integer) 2