etaty / rediscala

Non-blocking, Reactive Redis driver for Scala (with Sentinel support)
Apache License 2.0
790 stars 142 forks source link

Discrepancy between ZADD and ZRANGE score types #97

Closed maciej closed 9 years ago

maciej commented 9 years ago

In rediscala 1.4.0 ZADD expects memeber scores to be of type Double, whereas ZRANGE expects start and stop to be Longs. Is that intended?

See commands/SortedSets.scala.

etaty commented 9 years ago

Yes it is You want zrangebyscore http://redis.io/commands/zrangebyscore

http://redis.io/commands/zrange Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on.

maciej commented 9 years ago

@etaty thank you for a quick response! So yes, I mixed up the Redis commands. :-)