What is the order of returned elements from the Redis command ZRANGEBYLEX

12 views
Skip to first unread message

Manusha Wijekoon

unread,
Oct 10, 2016, 5:16:14 AM10/10/16
to Redis DB
What is the order of returned elements from the Redis command ZRANGEBYLEX? Or is it not defined? I understand elements are stored according to lexicographical ordering which allows Redis to support various types of queries. However documentation does not state how the retuned element list is ordered. From all the tests I have done so far it looks like they are ordered lexicographically but I like to get this confirmed.

Itamar Haber

unread,
Oct 10, 2016, 7:20:41 AM10/10/16
to Redis DB

Hi Manusha,

The order in which the replies are returned is indeed lexicographical in this case. Similarly, when not using lexicographical ordering, replies are returned ordered by their scores (and lexicographically for identical scores).


On Oct 10, 2016 12:16 PM, "Manusha Wijekoon" <manus...@gmail.com> wrote:
What is the order of returned elements from the Redis command ZRANGEBYLEX? Or is it not defined? I understand elements are stored according to lexicographical ordering which allows Redis to support various types of queries. However documentation does not state how the retuned element list is ordered. From all the tests I have done so far it looks like they are ordered lexicographically but I like to get this confirmed.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Manusha Wijekoon

unread,
Oct 11, 2016, 9:57:50 AM10/11/16
to Redis DB
Thanks you.


On Monday, October 10, 2016 at 12:20:41 PM UTC+1, Itamar Haber wrote:

Hi Manusha,

The order in which the replies are returned is indeed lexicographical in this case. Similarly, when not using lexicographical ordering, replies are returned ordered by their scores (and lexicographically for identical scores).

On Oct 10, 2016 12:16 PM, "Manusha Wijekoon" <manus...@gmail.com> wrote:
What is the order of returned elements from the Redis command ZRANGEBYLEX? Or is it not defined? I understand elements are stored according to lexicographical ordering which allows Redis to support various types of queries. However documentation does not state how the retuned element list is ordered. From all the tests I have done so far it looks like they are ordered lexicographically but I like to get this confirmed.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages