Closed
Description
Redis accepts -inf and +inf when specifying weights for a zUnionStore command (zUnion in phpredis).
As far as I can tell, phpredis "zUnion" simply omits a weight when specified as as a string (i.e. "-inf" does not work).
This comes very handy when one would like to make a "zset-diff", by simply executing a zUnion against two sets, specifying weights "1, '-inf'" and then zRangeByScore to get the resulting diff.
Metadata
Metadata
Assignees
Labels
No labels