Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

zunionstore #

Computes the union of the provided sorted sets, and stores the result in a new sorted set.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_zunionstore/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "keys": ["key1", "key2", "..."],
  // optional
  "weights": ["weight1", "weight2", "..."],
  "aggregate": "[sum|min|max]"
}

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "zunionstore",
  "_id": "<key>",
  "body": {
    "keys": ["key1", "key2", "..."],
    // optional
    "weights": ["weight1", "weight2", "..."],
    "aggregate": "[sum|min|max]"
  }
}

Argument #

  • _id: sorted set to create/overwrite with the computed intersection

Body properties #

Optional: #

  • aggregate (default: sum): specifies how members' scores are aggregated during the union
  • weights: specifies a multiplication factor for each input sorted set

Response #

Returns the number of members added to the destination sorted set.

Copied to clipboard!
{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "zunionstore",
  "collection": null,
  "index": null,
  "result": 31
}