Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 1.01 KB

File metadata and controls

73 lines (53 loc) · 1.01 KB
code type title
true
page
sunionstore

sunionstore

Computes the union of multiple sets of unique values and stores it in a new set.

If the destination key already exists, it is overwritten.

[Redis documentation]


Query Syntax

HTTP

URL: http://kuzzle:7512/ms/_sunionstore
Method: POST
Body:
{
  "destination": "<destination key>",
  "keys": ["key1", "key2", "..."]
}

Other protocols

{
  "controller": "ms",
  "action": "sunionstore",
  "body": {
    "destination": "<destination key>",
    "keys": ["key1", "key2", "..."]
  }
}

Body properties

  • destination: destination for the union result
  • keys: array of set identifiers

Response

Returns the number of members stored in the destination set.

{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "sunionstore",
  "collection": null,
  "index": null,
  "result": 31
}