pfadd

Adds elements to a HyperLogLog data structure.

[Redis documentation]


Query Syntax

HTTP

Copied to clipboard!
URL: http://kuzzle:7512/ms/_pfadd/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "elements": ["element1", "element2", "..."]
}

Other protocols

Copied to clipboard!
{
  "controller": "ms",
  "action": "pfadd",
  "_id": "<key>",
  "body": {
    "elements": ["element1", "element2", "..."]
  }
}

Argument

  • _id: hyperloglog key identifier

Body properties

  • elements: an array of values to add to the hyperloglog structure

Response

Returns either 0 (command failed), or 1 (command succeeded).

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