summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/pfmerge.md
blob: 90e1dc99b1a235116088d093058eb0753852414a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Merge multiple HyperLogLog values into an unique value that will approximate the
cardinality of the union of the observed Sets of the source HyperLogLog
structures.

The computed merged HyperLogLog is set to the destination variable, which is
created if does not exist (defaulting to an empty HyperLogLog).

If the destination variable exists, it is treated as one of the source sets and
its cardinality will be included in the cardinality of the computed HyperLogLog.

@return

@simple-string-reply: The command just returns `OK`.

@examples

```cli
PFADD hll1 foo bar zap a
PFADD hll2 a b c foo
PFMERGE hll3 hll1 hll2
PFCOUNT hll3
```