GitHub user git-hulk added a comment to the discussion: Does ZRANGE BYLEX 
behaviour differ from Redis?

@yatriks It's a really good finding. 

> 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 min and max.


I guess that's a design constraint inside Redis, because it now doesn't have an 
extra member name index to walk through when ranging with lex.

See [1].

> I find the kvrocks behaviour to be more intuitive but I don't know enough 
> about lexicographical ordering to determine if it is correct or wrong. There 
> are other range queries that have matching answers.

Yes, I also agree that Redis behavior was a bit counterintuitive, but I don't 
have a clear answer for the correctness. Keeping the same behavior with Redis 
would have less confusion from the user side, but it would be counterintuitive.

To see @apache/kvrocks-committers have any thoughts on this?


[1] https://redis.io/docs/latest/commands/zrangebylex/

GitHub link: 
https://github.com/apache/kvrocks/discussions/3487#discussioncomment-16925551

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to