summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/pfadd.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-03-21 10:28:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:16:53 +0000
commit06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch)
treee82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/pfadd.md
parentInitial commit. (diff)
downloadiredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz
iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/pfadd.md')
-rw-r--r--iredis/data/commands/pfadd.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/iredis/data/commands/pfadd.md b/iredis/data/commands/pfadd.md
new file mode 100644
index 0000000..e8e3f03
--- /dev/null
+++ b/iredis/data/commands/pfadd.md
@@ -0,0 +1,33 @@
+Adds all the element arguments to the HyperLogLog data structure stored at the
+variable name specified as first argument.
+
+As a side effect of this command the HyperLogLog internals may be updated to
+reflect a different estimation of the number of unique items added so far (the
+cardinality of the set).
+
+If the approximated cardinality estimated by the HyperLogLog changed after
+executing the command, `PFADD` returns 1, otherwise 0 is returned. The command
+automatically creates an empty HyperLogLog structure (that is, a Redis String of
+a specified length and with a given encoding) if the specified key does not
+exist.
+
+To call the command without elements but just the variable name is valid, this
+will result into no operation performed if the variable already exists, or just
+the creation of the data structure if the key does not exist (in the latter case
+1 is returned).
+
+For an introduction to HyperLogLog data structure check the `PFCOUNT` command
+page.
+
+@return
+
+@integer-reply, specifically:
+
+- 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.
+
+@examples
+
+```cli
+PFADD hll a b c d e f g
+PFCOUNT hll
+```