zunionstore

This block is part of the redis group and was last modified in core v15.0.3.

Redis Key Selection Required

This block relies on a Redis key to perform its redis releated actions. You must manually select the Redis key you want to use in the flow in the blueprint using the Redis key selector modal. To access the modal, click the white button on the block.

zunionstore v15.0.3

Stores the weighted union of sorted sets in a destination sorted set.

In pins 4 + flow
  • flow
  • destination value required

    key of the sorted set to write

  • sources array required

    keys of the sorted sets to combine, or {key, weight} objects

  • weights array

    one number per source

  • aggregate value

    sum, min or max

Out pins 4 + flow
  • flow
  • number number
  • success condition
  • error value
  • key value

sources is an array of sorted-set keys, or of {key, weight} objects; weights is an optional array of numbers, one per source (default 1). Each member's score is multiplied by its source's weight and combined with aggregate: sum (default), min or max. The destination and every source are keys in the entity's cache namespace, like every redis block's; the destination is overwritten. number is the size of the stored set. Refused without writing: MISSING_SOURCES, INVALID_SOURCE (an item without a key), INVALID_WEIGHTS (not a finite number, or a weights array of another length), INVALID_AGGREGATE. In simulation nothing is written: success=true with error NOT_EXECUTED_IN_SIMULATION_MODE.

redis zunionstore
zunionstore

Version history

Introduced in v15.0.3.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to redis Return to the main group to view all sub-groups Back to redis sorted sets Return to the group to view all blocks within this group