StackExchange / StackExchange/StackExchange.Redis
ZRANGEBYLEX (SortedSetRangeByValue) always returns the same results
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 1.6k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Similar to #1797, when using SortedSetRangeByValue in ascending order and minimum value and a limit, I always get the same results.
zadd SORTEDSET 0 aaa
zadd SORTEDSET 0 bbb
zadd SORTEDSET 0 ccc
zadd SORTEDSET 0 ddd
zadd SORTEDSET 0 eee
zrangebylex SORTEDSET "(ccc" + LIMIT 0 10
1) "ddd"
2) "eee"
In C#:
database.SortedSetRangeByValue(cacheKey, minValue, take: count)
// cacheKey = "SORTEDSET", minValue = "(ccc", count = 100

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SortedSetRangeByValue entry point and reproduce the supplied C# call alongside the equivalent Redis ZRANGEBYLEX command, focusing on minimum values and LIMIT handling. Done means the client behavior is consistent with the Redis example and no longer returns the same results when the range should differ.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100