SDK
SDK Javascript v5.x
1

pfmerge #

Merges multiple HyperLogLog data structures into an unique HyperLogLog structure stored at key, approximating the cardinality of the union of the source structures.

[Redis documentation]


pfmerge(key, sources, [options], callback) #

Arguments Type Description
key string Destination key identifier
sources string List of HyperLogLog source key identifiers
options JSON Object Optional parameters
callback function Callback

Options #

Option Type Description Default
queuable boolean Make this request queuable or not true

Callback Response #

Returns null if successful.

Usage #

Copied to clipboard!
// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.pfmerge('key', ['key1', 'key2', '...'], function (err) {
  // callback called once the action has completed
});
// Using promises (NodeJS only)
kuzzle.memoryStorage.pfmergePromise('key', ['key1', 'key2', '...'])
  .then(() => {
    // resolved once the action has completed
  });