EsRedisHyperLogLogCommands
Description
Provides an API for the Redis HyperLogLog commands. A HyperLogLog is a probabilistic data structure used in order to count unique things (technically this is referred to as estimating the cardinality of a set).
This command group is accessed via EsRedisClient>>hyperLogLogs.
Class Methods
None
Instance Methods
pfadd:elements:
Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as key.
Arguments:
aKey - <String> The key of the HyperLogLog.
aCollectionOfElements - <Collection> The elements to add.
Answers:
<Integer> 1 if at least one HyperLogLog internal register was altered, 0 otherwise.
<EsFuture> In async mode, a future that completes with the result.
pfcount:
Return the approximated cardinality of the set observed by the HyperLogLog.
Arguments:
aCollectionOfKeys - <Collection of String> The keys of the HyperLogLogs to count.
Answers:
<Integer> The approximated number of unique elements observed via PFADD.
<EsFuture> In async mode, a future that completes with the result.
pfmerge:sourceKeys:
Merge multiple HyperLogLog values into a single one.
Arguments:
aDestKey - <String> The destination key.
aCollectionOfSourceKeys - <Collection of String> The source keys.
Answers:
<String> 'OK'.
<EsFuture> In async mode, a future that completes with the result.
Last modified date: 01/22/2026