Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions content/commands/cf.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ If `key` does not exist - a new cuckoo filter is created.
is an item to add.
</details>

## 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
- [] on error (invalid arguments, wrong key type, etc.) and also when the filter is full

## Complexity

O(n + i), where n is the number of `sub-filters` and i is `maxIterations`.
Expand All @@ -72,3 +65,21 @@ redis> CF.ADD cf item1
redis> CF.ADD cf item1
(integer) 1
{{< / highlight >}}

## Return information

{{< multitabs id="cf-add-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): `1` for successfully adding an item 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]({{< relref "/develop/reference/protocol-spec#booleans" >}}): `true` for successfully adding an item 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 >}}
25 changes: 18 additions & 7 deletions content/commands/cf.addnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ If `key` does not exist - a new cuckoo filter is created.
is an item to add.
</details>

## Return value

Returns one of these replies:

- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `0` means that the item's fingerprint already exist in the filter, and `1` means that the item has been successfully added to the filter.
- [] on error (invalid arguments, wrong key type, etc.) and also when the filter is full.

## Examples

{{< highlight bash >}}
Expand All @@ -71,3 +64,21 @@ redis> CF.ADDNX cf item
redis> CF.ADDNX cf item
(integer) 0
{{< / highlight >}}

## Return information

{{< multitabs id="cf-addnx-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): `1` for successfully adding an item to the filter or `0` if the item's fingerprint already exists in 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]({{< relref "/develop/reference/protocol-spec#booleans" >}}): `true` for successfully adding an item to the filter or `false` if the item's fingerprint already exists in 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 >}}
25 changes: 18 additions & 7 deletions content/commands/cf.count.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ is key name for a cuckoo filter.
is an item to check.
</details>

## Return value

Returns one of these replies:

- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where a positive value is an estimation of the number of times `item` was added to the filter. An overestimation is possible, but not an underestimation. `0` means that `key` does not exist or that `item` had not been added to the filter. See note in [`CF.DEL`]({{< relref "commands/cf.del/" >}}).
- [] on error (invalid arguments, wrong key type, etc.)

## Examples

{{< highlight bash >}}
Expand All @@ -67,3 +60,21 @@ redis> CF.COUNT cf item1
redis> CF.COUNT cf item2
(integer) 2
{{< / highlight >}}

## Return information

{{< multitabs id=“cf-count-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where a positive value is an estimation of the number of times `item` was added to the filter. An overestimation is possible, but not an underestimation. `0` means that `key` does not exist or that `item` had not been added to the filter. See the note in [`CF.DEL`]({{< relref "commands/cf.del/" >}}).
* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments or wrong key type.

-tab-sep-

One of the following:
* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where a positive value is an estimation of the number of times `item` was added to the filter. An overestimation is possible, but not an underestimation. `0` means that `key` does not exist or that `item` had not been added to the filter. See the note in [`CF.DEL`]({{< relref "commands/cf.del/" >}}).
* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments or wrong key type.

{{< /multitabs >}}
25 changes: 18 additions & 7 deletions content/commands/cf.del.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ is an item to delete.
O(n), where n is the number of `sub-filters`. Both alternative locations are
checked on all `sub-filters`.

## Return value

Returns one of these replies:

- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) - where "1" means that the item has been deleted, and "0" means that such item was not found in the filter
- [] on error (invalid arguments, wrong key type, etc.)

## Examples

{{< highlight bash >}}
Expand All @@ -82,3 +75,21 @@ redis> CF.DEL cf item2
redis> CF.DEL cf item2
(integer) 0
{{< / highlight >}}

## Return information

{{< multitabs id=“cf-del-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) `1` for successfully deleting an item, or `0` if no such item was found in the filter.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments or wrong key type.

-tab-sep-

One of the following:
* [Boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}) `true` for successfully deleting an item, or `false` if no such item was found in the filter.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments or wrong key type.

{{< /multitabs >}}
23 changes: 16 additions & 7 deletions content/commands/cf.exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ is key name for a cuckoo filter.
is an item to check.
</details>

## Return value

Returns one of these replies:

- [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), where `1` means that, with high probability, `item` had already been added to the filter, and `0` means that `key` does not exist or that `item` had not been added to the filter. See note in [`CF.DEL`]({{< relref "commands/cf.del/" >}}).
- [] on error (invalid arguments, wrong key type, and so on)

## Examples

{{< highlight bash >}}
Expand All @@ -65,3 +58,19 @@ redis> CF.EXISTS cf item1
redis> CF.EXISTS cf item2
(integer) 0
{{< / highlight >}}

{{< multitabs id="cf-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]({{< 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]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) if invalid arguments are passed or `key` is not of the correct type.

{{< /multitabs >}}
25 changes: 18 additions & 7 deletions content/commands/cf.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ Returns information about a cuckoo filter.
is key name for a cuckoo filter.
</details>

## Return value

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)

## Examples

{{< highlight bash >}}
Expand All @@ -66,3 +59,21 @@ redis> CF.INFO cf
15) Max iteration
16) (integer) 20
{{< / highlight >}}

## Return information

One of the following:

{{< multitabs id=“cf-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}

* [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" >}}) if invalid arguments are passed, `key` does not exist, or `key` is not of the correct type.

-tab-sep-

* [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" >}}) if invalid arguments are passed, `key` does not exist, or `key` is not of the correct type.

{{< /multitabs >}}
25 changes: 18 additions & 7 deletions content/commands/cf.insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ If specified, prevents automatic filter creation if the filter does not exist (I
This option is mutually exclusive with `CAPACITY`.
</details>

## 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 the item has been successfully added to the filter, and "-1" means that the item was not added because the filter is full.
- [] on error (invalid arguments, wrong key type, and so on) and also when `NOCREATE` is specified and `key` does not exist.

## Examples

{{< highlight bash >}}
Expand All @@ -113,3 +106,21 @@ redis> CF.INSERT cf2 ITEMS 1 1 1 1
3) (integer) -1
4) (integer) -1
{{< / highlight >}}

## Return information

{{< multitabs id=“cf-insert-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:

* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) of `1` for successfully adding an item, or `-1` when the item cannot be added because the filter is full.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) when the number of arguments or key type is incorrect, and also when `NOCREATE` is specified and `key` does not exist.

-tab-sep-

* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is a [boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}) of `1` for successfully adding an item, or `-1` when the item cannot be added because the filter is full.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) when the number of arguments or key type is incorrect, and also when `NOCREATE` is specified and `key` does not exist.

{{< /multitabs >}}
25 changes: 18 additions & 7 deletions content/commands/cf.insertnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ If specified, prevents automatic filter creation if the filter does not exist (I
This option is mutually exclusive with `CAPACITY`.
</details>

## 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 `0` means that the item's fingerprint already exists in the filter, `1` means that the item has been successfully added to the filter, and `-1` means that the item was not added because the filter is full.
- [] on error (invalid arguments, wrong key type, etc.) and also when `NOCREATE` is specified and `key` does not exist.

### Complexity

O(n + i), where n is the number of `sub-filters` and i is `maxIterations`.
Expand All @@ -123,3 +116,21 @@ redis> CF.INSERTNX cf CAPACITY 1000 ITEMS item1 item2 item3
redis> CF.INSERTNX cf_new CAPACITY 1000 NOCREATE ITEMS item1 item2
(error) ERR not found
{{< / highlight >}}

## Return information

{{< multitabs id=“cf-insert-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:

* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is an [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) of `0` means that the item's fingerprint already exists in the filter, `1` for successfully adding an item, or `-1` when the item cannot be added because the filter is full.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) when the number of arguments or key type is incorrect, and also when `NOCREATE` is specified and `key` does not exist.

-tab-sep-

* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is a [boolean reply]({{< relref "/develop/reference/protocol-spec#booleans" >}}) of `1` for successfully adding an item, or `-1` when the item cannot be added because the filter is full.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors">}}) when the number of arguments or key type is incorrect, and also when `NOCREATE` is specified and `key` does not exist.

{{< /multitabs >}}
18 changes: 18 additions & 0 deletions content/commands/cf.loadchunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,21 @@ Returns one of these replies:
## Examples

See [`CF.SCANDUMP`]({{< relref "commands/cf.scandump/" >}}) for an example.

## Return information

{{< multitabs id="bf-loadchunk-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [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 reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed.

{{< /multitabs >}}
25 changes: 18 additions & 7 deletions content/commands/cf.mexists.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ is key name for a cuckoo filter.
One or more items to check.
</details>

## 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` had not added to the filter. See note in [`CF.DEL`]({{< relref "commands/cf.del/" >}}).
- [] on error (invalid arguments, wrong key type, etc.)

## Examples

{{< highlight bash >}}
Expand All @@ -68,3 +61,21 @@ redis> CF.MEXISTS cf 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. See note in [`CF.DEL`]({{< relref "commands/cf.del/" >}}).
* [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 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 >}}
25 changes: 18 additions & 7 deletions content/commands/cf.reserve.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ When a new filter is created, its size is the size of the current filter multipl
Expansion is rounded to the next `2^n` number.
</details>

## 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 >}}
Expand All @@ -126,3 +119,21 @@ redis> CF.RESERVE cf 1000
redis> CF.RESERVE cf_params 1000 BUCKETSIZE 8 MAXITERATIONS 20 EXPANSION 2
OK
{{< / highlight >}}

## Return information

{{< multitabs id="cf-reserve-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [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]({{< 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 >}}
Loading