8000 zUnion omits '-inf' / '+inf' weights. · Issue #336 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content
zUnion omits '-inf' / '+inf' weights. #336
Closed
@fnukis

Description

@fnukis

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0