ZRANGEBYLEX do?ZRANGEBYLEX returns members in a sorted set within a specified lexicographic range.
It sorts by dictionary order, not by score.
ZRANGEBYLEX?Use square brackets [ before the value.
Example: [apple means include 'apple' in the range.
ZRANGEBYLEX?Use parentheses ( before the value.
Example: (apple means exclude 'apple' from the range.
- and + mean in ZRANGEBYLEX?- means the smallest possible value (start of range).
+ means the largest possible value (end of range).
ZRANGEBYLEX be used to query by score in Redis sorted sets?No. ZRANGEBYLEX queries by lexicographic order of members, ignoring scores.
Use ZRANGEBYSCORE to query by score.
ZRANGEBYLEX myset [a (c return?Square bracket [ means inclusive, parenthesis ( means exclusive.
So range is from 'a' inclusive to 'c' exclusive.
(mango means exclude 'mango', + means max value.
This returns members greater than 'mango'.
- symbol mean in ZRANGEBYLEX?- means the smallest possible member in lexicographic order.
Square bracket [ means include the member.
ZRANGEBYLEX return members sorted by their scores?ZRANGEBYLEX sorts members by their lexicographic order, ignoring scores.
ZRANGEBYLEX to get members between two lexicographic values, including how to specify inclusive and exclusive ranges.ZRANGEBYLEX and ZRANGEBYSCORE in Redis sorted sets.