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)).
As of Redis version 6.2.0, this command is regarded as deprecated.
It can be replaced by
ZRANGE with the
BYLEX arguments when migrating or writing new code.
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at
key with a value between
Apart from the reversed ordering,
ZREVRANGEBYLEX is similar to
Array reply: list of elements in the specified score range.