GitHub user yatriks created a discussion: Does ZRANGE BYLEX behaviour differ
from Redis?
Perhaps this is covered somewhere else or documented, but I see a variance in
the behaviour of `ZRANGE BYLEX` between `redis` and `kvrocks`. Example:
```
❯ redis-cli -p 6666 zadd test 1 abcd0 2 abcd1 1 abcc0 2 abcc1
(integer) 4
❯ redis-cli -p 6666 zrange test \[abcd0 \[abcd5 bylex
1) "abcd0"
2) "abcd1"
❯ redis-cli -p 6379 zadd test 1 abcd0 2 abcd1 1 abcc0 2 abcc1
(integer) 4
❯ redis-cli -p 6379 zrange test \[abcd0 \[abcd5 bylex
1) "abcd0"
2) "abcc1"
3) "abcd1"
```
My compose file is like so:
```yml
services:
kvrocks:
image: 'apache/kvrocks:latest'
ports:
- '6666:6666'
redis:
image: 'redis:8-alpine3.23'
ports:
- '6379:6379'
```
I believe this has to do with the behaviour of the internal rocksdb column
family keys?
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. There are times where the
answer I expect is the one kvrocks provides, as it is able to use BYSCORE for
score queries and BYLEX for lex queries *which ignore score* which is useful,
but again, unsure if that is correct.
Please let me know if there's any other information I can provide, or if
there's anything I've missed.
GitHub link: https://github.com/apache/kvrocks/discussions/3487
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]