Skip to main content

ZREVRANGEBYLEX

Note

Official reference: ZREVRANGEBYLEX.

Read a lexicographical range in descending order.

Syntax​

ZREVRANGEBYLEX key max min [LIMIT offset count]

Members must have equal scores. [value is inclusive and (value exclusive; - and + mean unbounded lower and upper limits.

Bounds are ordered max min. LIMIT offset count skips offset matching members and returns at most count.

ZRANGE ... BYLEX REV is also available.

Results​

ReturnRowsContent
ResultSetmultipleELEMENT field, STRING type

Example​

ZADD demo:letters 0 alice 0 bob
ZREVRANGEBYLEX demo:letters [z [a LIMIT 0 10