SDK
SDK Javascript v5.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.

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) #

ArgumentsTypeDescription
keystringDestination key identifier
sourcesstringList of HyperLogLog source key identifiers
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

Returns null if successful.

Usage #

// 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
  });