From 98379b3f358fa06c877aafe532088991c10d732e Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 17 Jun 2025 14:01:13 -0700 Subject: [PATCH 1/2] DEV: add RESP2/3 return information to the Bloom filter commands --- content/commands/bf.add.md | 25 +++++++++++++++------- content/commands/bf.card.md | 30 ++++++++++++++++++-------- content/commands/bf.exists.md | 25 +++++++++++++++------- content/commands/bf.info.md | 32 +++++++++++++++------------- content/commands/bf.insert.md | 31 +++++++++++++++++++-------- content/commands/bf.loadchunk.md | 23 ++++++++++++++------ content/commands/bf.madd.md | 24 ++++++++++++++++++++- content/commands/bf.mexists.md | 25 +++++++++++++++------- content/commands/bf.reserve.md | 25 +++++++++++++++------- content/commands/bf.scandump.md | 36 +++++++++++++++++++++++--------- 10 files changed, 199 insertions(+), 77 deletions(-) diff --git a/content/commands/bf.add.md b/content/commands/bf.add.md index 39d0068a71..5332b4adc5 100644 --- a/content/commands/bf.add.md +++ b/content/commands/bf.add.md @@ -49,13 +49,6 @@ If `key` does not exist - a new Bloom filter is created with default error rate, is an item to add. -## Return value - -Returns one of these replies: - -- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) - where "1" means that the item has been added successfully, and "0" means that such item was already added to the filter (which could be wrong) -- [] on error (invalid arguments, wrong key type, etc.) and also when the filter is full - ## Examples {{< highlight bash >}} @@ -64,3 +57,21 @@ redis> BF.ADD bf item1 redis> BF.ADD bf item1 (integer) 0 {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-add-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply](../../develop/reference/protocol-spec#integers): `1` for successfully adding an item, or `0` if there's a probability that the item was already added to the filter. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, wrong key type, or when the filter is full. + +-tab-sep- + +One of the following: +* [Boolean reply](../../develop/reference/protocol-spec#booleans): `true` for successfully adding an item, or `false` if there's a probability that the item was already added to the filter. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, wrong key type, or when the filter is full. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.card.md b/content/commands/bf.card.md index 91ef5478cc..713e0357f7 100644 --- a/content/commands/bf.card.md +++ b/content/commands/bf.card.md @@ -41,15 +41,6 @@ is key name for a Bloom filter. -## Return value - -Returns one of these replies: - -- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) - the number of items that were added to this Bloom filter and detected as unique (items that caused at least one bit to be set in at least one sub-filter), or 0 when `key` does not exist. -- [] on error (invalid arguments, wrong key type, etc.) - -Note: when `key` exists - return the same value as `BF.INFO key ITEMS`. - ## Examples {{< highlight bash >}} @@ -60,3 +51,24 @@ redis> BF.CARD bf1 redis> BF.CARD bf_new (integer) 0 {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-card-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of items detected as unique that were added to the Bloom filter (items that caused at least one bit to be set in at least one sub-filter), or `0` when the given `key` does not exist. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full. + +Note: when `key` exists, `BF.CARD` returns the same value as `BF.INFO key ITEMS`. + +-tab-sep- + +One of the following: +* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of items detected as unique that were added to the Bloom filter (items that caused at least one bit to be set in at least one sub-filter), or `0` when the given `key` does not exist. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, wrong key type, or when the filter is full. + +Note: when `key` exists, `BF.CARD` returns the same value as `BF.INFO key ITEMS`. +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.exists.md b/content/commands/bf.exists.md index 0722599d12..18917f1b6c 100644 --- a/content/commands/bf.exists.md +++ b/content/commands/bf.exists.md @@ -48,13 +48,6 @@ is key name for a Bloom filter. is an item to check. -## Return value - -Returns one of these replies: - -- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `1` means that, with high probability, `item` was already added to the filter, and `0` means that `key` does not exist or that `item` had not been added to the filter. -- [] on error (invalid arguments, wrong key type, etc.) - ## Examples {{< highlight bash >}} @@ -65,3 +58,21 @@ redis> BF.EXISTS bf item1 redis> BF.EXISTS bf item2 (integer) 0 {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-exists-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): `1` means that, with high probability, `item` was already added to the filter, and `0` means that either the `key` does not exist or that the `item` had not been added to the filter. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) if invalid arguments are passed. + +-tab-sep- + +One of the following: +* [Boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}): `true` means that, with high probability, `item` was already added to the filter, and `false` means that either `key` does not exist or that `item` had not been added to the filter. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) if invalid arguments are passed or `key` is not of the correct type. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.info.md b/content/commands/bf.info.md index 83db39b374..5a3d574129 100644 --- a/content/commands/bf.info.md +++ b/content/commands/bf.info.md @@ -84,20 +84,6 @@ Return the number of items that were added to this Bloom filter and detected as Return the expansion rate. -When no optional argument is specified: return all information fields. - -## Return value - -When no optional argument is specified, returns one of these replies: - -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with argument name ([Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) and value ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}})) pairs -- [] on error (invalid arguments, key does not exist, wrong key type, and so on) - -When an optional argument is specified, returns one of these replies: - -- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) - argument value -- [] on error (invalid arguments, key does not exist, wrong key type, and so on) - ## Examples {{< highlight bash >}} @@ -117,3 +103,21 @@ redis> BF.INFO bf1 redis> BF.INFO bf1 CAPACITY 1) (integer) 100 {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-info-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with argument name ([Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) and value ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}})) pairs. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the key does not exist. + +-tab-sep- + +One of the following: +* [Map reply]({{< relref "/develop/reference/protocol-spec#maps" >}}) with argument name ([Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) and value ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}})) pairs. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the key does not exist. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.insert.md b/content/commands/bf.insert.md index c16bf116b3..cfaa864f31 100644 --- a/content/commands/bf.insert.md +++ b/content/commands/bf.insert.md @@ -118,15 +118,6 @@ If the number of elements to be stored in the filter is unknown, use an `expansi Otherwise, use an `expansion` of `1` to reduce memory consumption. The default value is `2`. -## Return value - -Returns one of these replies: - -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) where each element is one of these options: - - [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `1` denotes that the item has been added successfully, and `0` means that such item had already added to the filter (which could be wrong) - - [] when the item cannot be added because the filter is full -- [], for example, when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. - ## Examples Add three items to a filter, then create the filter with default parameters if it does not already exist. @@ -146,3 +137,25 @@ Add two items to a filter, then return error if the filter does not already exis {{< highlight bash >}} BF.INSERT filter NOCREATE ITEMS foo bar {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-insert-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: where each element is one of these options: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is one of the following options: + * [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) `1` for successfully adding an item, or `0` if there's a probability that the item was already added to the filter. + * [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the item cannot be added because the filter is full. +* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. + +-tab-sep- + +One of the following: where each element is one of these options: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is one of the following options: + * [Boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}) `true` for successfully adding an item, or `false` if there's a probability that the item was already added to the filter. + * [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the item cannot be added because the filter is full. +* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.loadchunk.md b/content/commands/bf.loadchunk.md index 79981541f4..826cbf8e16 100644 --- a/content/commands/bf.loadchunk.md +++ b/content/commands/bf.loadchunk.md @@ -61,13 +61,24 @@ Iterator value associated with `data` (returned by [`BF.SCANDUMP`]({{< relref "c Current data chunk (returned by [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}})) -## Return value +## Examples -Returns one of these replies: +See [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}}) for an example. -- [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}) - `OK` if executed correctly -- [] on error (invalid arguments, wrong key type, wrong data, etc.) +## Return information -## Examples +{{< multitabs id="bf-loadchunk-return-info" + tab1="RESP2" + tab2="RESP3" >}} -See [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}}) for an example. +One of the following: +* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly. +* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed. + +-tab-sep- + +One of the following: +* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly. +* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.madd.md b/content/commands/bf.madd.md index 46e6efd742..6f52764dd4 100644 --- a/content/commands/bf.madd.md +++ b/content/commands/bf.madd.md @@ -55,7 +55,7 @@ If `key` does not exist - a new Bloom filter is created with default error rate, One or more items to add. -## Return value +## Return information Returns one of these replies: @@ -72,3 +72,25 @@ redis> BF.MADD bf item1 item2 item2 2) (integer) 1 3) (integer) 0 {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-madd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) where each element is either + * an [integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `1` means that the item has been added successfully, and `0` means there's a probability that the item was already added to the filter. + * a [simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) when the item cannot be added because the filter is full. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, key not found, wrong key type, or when the filter is full. + +-tab-sep- + +One of the following: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) where each element is either + * a [boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}), where `true` means that the item has been added successfully, and `false` means there's a probability that the item was already added to the filter. + * a [simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) when the item cannot be added because the filter is full. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, key not found, wrong key type, or when the filter is full. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.mexists.md b/content/commands/bf.mexists.md index 42cf64dcad..942580b5d1 100644 --- a/content/commands/bf.mexists.md +++ b/content/commands/bf.mexists.md @@ -50,13 +50,6 @@ is key name for a Bloom filter. One or more items to check. -## Return value - -Returns one of these replies: - -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) - where "1" means that, with high probability, `item` was already added to the filter, and "0" means that `key` does not exist or that `item` was definitely not added to the filter. -- [] on error (invalid arguments, wrong key type, etc.) - ## Examples {{< highlight bash >}} @@ -68,3 +61,21 @@ redis> BF.MEXISTS bf item1 item2 item3 2) (integer) 1 3) (integer) 0 {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-mexists-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [integer replies]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `1` means that, with high probability, `item` was already added to the filter, and `0` means that `key` does not exist or that `item` was definitely not added to the filter. +* [Simple error] in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found. + +-tab-sep- + +One of the following: +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [boolean replies]({{< relref "/develop/reference/protocol-spec#booleans" >}}), where `true` means that, with high probability, `item` was already added to the filter, and `false` means that `key` does not exist or that `item` was definitely not added to the filter. +* [Simple error]: in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found. + +{{< /multitabs >}} diff --git a/content/commands/bf.reserve.md b/content/commands/bf.reserve.md index 07f4d77e65..f1f5996abc 100644 --- a/content/commands/bf.reserve.md +++ b/content/commands/bf.reserve.md @@ -95,13 +95,6 @@ If the number of items to be stored in the filter is unknown, you use an `expans Otherwise, you use an `expansion` of `1` to reduce memory consumption. The default value is `2`. -## Return value - -Returns one of these replies: - -- [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}) - `OK` if filter created successfully -- [] on error (invalid arguments, key already exists, etc.) - ## Examples {{< highlight bash >}} @@ -123,3 +116,21 @@ OK redis> BF.RESERVE bf_non 0.01 1000 NONSCALING OK {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-reserve-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the filter was created successfully. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments or the key already exists. + +-tab-sep- + +One of the following: +* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the filter was created successfully. +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments or the key already exists. + +{{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.scandump.md b/content/commands/bf.scandump.md index 7305827419..5c6230a5f9 100644 --- a/content/commands/bf.scandump.md +++ b/content/commands/bf.scandump.md @@ -51,17 +51,7 @@ is key name for a Bloom filter to save. Iterator value; either 0 or the iterator from a previous invocation of this command -## Return value -Returns one of these replies: - -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) (_Iterator_) and [] (_Data_). - - The Iterator is passed as input to the next invocation of `BF.SCANDUMP`. If _Iterator_ is 0, then it means iteration has completed. - - The iterator-data pair should also be passed to [`BF.LOADCHUNK`]({{< relref "commands/bf.loadchunk/" >}}) when restoring the filter. - -- [] on error (invalid arguments, key not found, wrong key type, etc.) ## Examples @@ -105,3 +95,29 @@ for chunk in chunks: iter, data = chunk BF.LOADCHUNK(key, iter, data) {{< / highlight >}} + +## Return information + +{{< multitabs id="bf-scandump-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array of an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers">}}) (_Iterator_) and a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (_Data_). +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, the key was not found, or the key is of the wrong type. + +The Iterator is passed as input to the next invocation of `BF.SCANDUMP`. If _Iterator_ is 0, then it means iteration has completed. + +The iterator-data pair should also be passed to [`BF.LOADCHUNK`]({{< relref "commands/bf.loadchunk/" >}}) when restoring the filter. + +-tab-sep- + +One of the following: +* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array of an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers">}}) (_Iterator_) and a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (_Data_). +* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, the key was not found, or the key is of the wrong type. + +The Iterator is passed as input to the next invocation of `BF.SCANDUMP`. If _Iterator_ is 0, then it means iteration has completed. + +The iterator-data pair should also be passed to [`BF.LOADCHUNK`]({{< relref "commands/bf.loadchunk/" >}}) when restoring the filter. + +{{< /multitabs >}} \ No newline at end of file From 2ef85128bd0af13bea4a99a889dd4253d3e1a87e Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 17 Jun 2025 15:11:26 -0700 Subject: [PATCH 2/2] Apply review comments + some other fixes --- content/commands/bf.add.md | 8 ++++---- content/commands/bf.card.md | 2 +- content/commands/bf.exists.md | 4 ++-- content/commands/bf.insert.md | 4 ++-- content/commands/bf.loadchunk.md | 4 ++-- content/commands/bf.mexists.md | 4 ++-- content/commands/bf.reserve.md | 8 ++++---- content/commands/bf.scandump.md | 8 ++++---- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/content/commands/bf.add.md b/content/commands/bf.add.md index 5332b4adc5..a601290416 100644 --- a/content/commands/bf.add.md +++ b/content/commands/bf.add.md @@ -65,13 +65,13 @@ redis> BF.ADD bf item1 tab2="RESP3" >}} One of the following: -* [Integer reply](../../develop/reference/protocol-spec#integers): `1` for successfully adding an item, or `0` if there's a probability that the item was already added to the filter. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, wrong key type, or when the filter is full. +* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): `1` for successfully adding an item, or `0` if there's a probability that the item was already added to the filter. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full. -tab-sep- One of the following: -* [Boolean reply](../../develop/reference/protocol-spec#booleans): `true` for successfully adding an item, or `false` if there's a probability that the item was already added to the filter. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, wrong key type, or when the filter is full. +* [Boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}): `true` for successfully adding an item, or `false` if there's a probability that the item was already added to the filter. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full. {{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.card.md b/content/commands/bf.card.md index 713e0357f7..d941c5c77c 100644 --- a/content/commands/bf.card.md +++ b/content/commands/bf.card.md @@ -68,7 +68,7 @@ Note: when `key` exists, `BF.CARD` returns the same value as `BF.INFO key ITEMS` One of the following: * [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of items detected as unique that were added to the Bloom filter (items that caused at least one bit to be set in at least one sub-filter), or `0` when the given `key` does not exist. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, wrong key type, or when the filter is full. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full. Note: when `key` exists, `BF.CARD` returns the same value as `BF.INFO key ITEMS`. {{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.exists.md b/content/commands/bf.exists.md index 18917f1b6c..dadd9c042b 100644 --- a/content/commands/bf.exists.md +++ b/content/commands/bf.exists.md @@ -67,12 +67,12 @@ redis> BF.EXISTS bf item2 One of the following: * [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): `1` means that, with high probability, `item` was already added to the filter, and `0` means that either the `key` does not exist or that the `item` had not been added to the filter. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) if invalid arguments are passed. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) if invalid arguments are passed. -tab-sep- One of the following: * [Boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}): `true` means that, with high probability, `item` was already added to the filter, and `false` means that either `key` does not exist or that `item` had not been added to the filter. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) if invalid arguments are passed or `key` is not of the correct type. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) if invalid arguments are passed or `key` is not of the correct type. {{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.insert.md b/content/commands/bf.insert.md index cfaa864f31..063d8a1d6e 100644 --- a/content/commands/bf.insert.md +++ b/content/commands/bf.insert.md @@ -148,7 +148,7 @@ One of the following: where each element is one of these options: * [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is one of the following options: * [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) `1` for successfully adding an item, or `0` if there's a probability that the item was already added to the filter. * [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the item cannot be added because the filter is full. -* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. -tab-sep- @@ -156,6 +156,6 @@ One of the following: where each element is one of these options: * [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is one of the following options: * [Boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}) `true` for successfully adding an item, or `false` if there's a probability that the item was already added to the filter. * [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the item cannot be added because the filter is full. -* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist. {{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.loadchunk.md b/content/commands/bf.loadchunk.md index 826cbf8e16..5c830c6b5a 100644 --- a/content/commands/bf.loadchunk.md +++ b/content/commands/bf.loadchunk.md @@ -73,12 +73,12 @@ See [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}}) for an example. One of the following: * [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly. -* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed. -tab-sep- One of the following: * [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly. -* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed. {{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.mexists.md b/content/commands/bf.mexists.md index 942580b5d1..e4addcefd9 100644 --- a/content/commands/bf.mexists.md +++ b/content/commands/bf.mexists.md @@ -70,12 +70,12 @@ redis> BF.MEXISTS bf item1 item2 item3 One of the following: * [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [integer replies]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `1` means that, with high probability, `item` was already added to the filter, and `0` means that `key` does not exist or that `item` was definitely not added to the filter. -* [Simple error] in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found. -tab-sep- One of the following: * [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [boolean replies]({{< relref "/develop/reference/protocol-spec#booleans" >}}), where `true` means that, with high probability, `item` was already added to the filter, and `false` means that `key` does not exist or that `item` was definitely not added to the filter. -* [Simple error]: in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found. {{< /multitabs >}} diff --git a/content/commands/bf.reserve.md b/content/commands/bf.reserve.md index f1f5996abc..19188663e9 100644 --- a/content/commands/bf.reserve.md +++ b/content/commands/bf.reserve.md @@ -124,13 +124,13 @@ OK tab2="RESP3" >}} One of the following: -* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the filter was created successfully. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments or the key already exists. +* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if the filter was created successfully. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments or the key already exists. -tab-sep- One of the following: -* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the filter was created successfully. -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments or the key already exists. +* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if the filter was created successfully. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments or the key already exists. {{< /multitabs >}} \ No newline at end of file diff --git a/content/commands/bf.scandump.md b/content/commands/bf.scandump.md index 5c6230a5f9..1b61aedbc6 100644 --- a/content/commands/bf.scandump.md +++ b/content/commands/bf.scandump.md @@ -103,8 +103,8 @@ for chunk in chunks: tab2="RESP3" >}} One of the following: -* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array of an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers">}}) (_Iterator_) and a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (_Data_). -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, the key was not found, or the key is of the wrong type. +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a two-element array of an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) (_Iterator_) and a [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}) (_Data_). +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, the key was not found, or the key is of the wrong type. The Iterator is passed as input to the next invocation of `BF.SCANDUMP`. If _Iterator_ is 0, then it means iteration has completed. @@ -113,8 +113,8 @@ The iterator-data pair should also be passed to [`BF.LOADCHUNK`]({{< relref "com -tab-sep- One of the following: -* [Array reply](../../develop/reference/protocol-spec#arrays): a two-element array of an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers">}}) (_Iterator_) and a [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (_Data_). -* [Simple error reply](../../develop/reference/protocol-spec#simple-errors) in these cases: invalid arguments, the key was not found, or the key is of the wrong type. +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a two-element array of an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) (_Iterator_) and a [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}) (_Data_). +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, the key was not found, or the key is of the wrong type. The Iterator is passed as input to the next invocation of `BF.SCANDUMP`. If _Iterator_ is 0, then it means iteration has completed.