zrevrange() gives empty results
See original GitHub issue- Version: 5.0.3(Linux on Docker)
- Platform: Node.js v8.12.0 on Windows 10
- Description: zrevrange() returns [] even though on redis-cli it gives non-empty array as result.
let idList = await this.client.zrevrange(
${this.exactStore}:${word}
, 0, -1);
Output from Code:
console.log(
ZREVRANGE ${this.exactStore}:${word} 0 -1
); produces the following ZREVRANGE exactstore:rse:frank 0 -1 []
Output from Redis-Cli:
127.0.0.1:6379> ZREVRANGE exactstore:rse:frank 0 -1
- “aG2_aHKvxFEzE9CeUlo_y”
- “JHihXTds2T0cNnr4er0D1”
Please take a look at node_redis for the same issue in node_redis libary.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Redis ZRANGEBYSCORE returning empty set - Stack Overflow
Usually I'd try to use a sorted set for each model/event that being tracked per aggregation level needed. Key expiration is useful, but ......
Read more >ZREVRANGE - Redis
Returns the specified range of elements in the sorted set stored at key . The elements are considered to be ordered from the...
Read more >ZREVRANGE | YugabyteDB Docs
This command returns members ordered from highest to lowest score in the specified range at sorted set key . start and stop represent...
Read more >zrange returns empty list or set : r/redis - Reddit
I am using RedisTemplate to add and retrieve sorted set values. Though the 'zadd' part works fine. On performing zrange, empty list is ......
Read more >SortedSetsApi - extends ApiSubset
The type constructor into which a result of each command is wrapped. ... false): Result[Int]. Executes ZADD or simply returns 0 when memberScores...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@luin Thanks for the important information. I got the commands back and is being executed on same db, but I found out that there’s a word joiner unicode character
\xe2\x81\xa0
present in the strings which are actually present in the db. But there’s no extra unicode character in my string before I pass it to zrevrange().@luin yes ofcourse, after identifying that an extra unicode character is present, I got the idea that it had nothing to do with neither redis client nor redis itself. I was asking that doubt in general.