sdiffstore

Computes the difference between a reference set of unique values, and other sets. The differences are then stored in the provided destination key.

If the destination key already exists, it is overwritten.

[Redis documentation]


Query Syntax

HTTP

Copied to clipboard!
URL: http://kuzzle:7512/ms/_sdiffstore/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "destination": "<key>",
  "keys": ["key1", "key2", "..."]
}

Other protocols

Copied to clipboard!
{
  "controller": "ms",
  "action": "sdiffstore",
  "_id": "<key>",
  "body": {
    "destination": "<key>",
    "keys": ["key1", "key2", "..."]
  }
}

Argument

  • _id: reference set identifier

Body properties

  • destination: the new set to create
  • keys: source sets to diff with the reference set

Response

Returns the number of elements stored in the resulting set.

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