You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/commands/bf.add.md
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,13 +49,6 @@ If `key` does not exist - a new Bloom filter is created with default error rate,
49
49
is an item to add.
50
50
</details>
51
51
52
-
## Return value
53
-
54
-
Returns one of these replies:
55
-
56
-
-[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)
57
-
-[] on error (invalid arguments, wrong key type, etc.) and also when the filter is full
58
-
59
52
## Examples
60
53
61
54
{{< highlight bash >}}
@@ -64,3 +57,21 @@ redis> BF.ADD bf item1
64
57
redis> BF.ADD bf item1
65
58
(integer) 0
66
59
{{< / highlight >}}
60
+
61
+
## Return information
62
+
63
+
{{< multitabs id="bf-add-return-info"
64
+
tab1="RESP2"
65
+
tab2="RESP3" >}}
66
+
67
+
One of the following:
68
+
*[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.
69
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full.
70
+
71
+
-tab-sep-
72
+
73
+
One of the following:
74
+
*[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.
75
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full.
Copy file name to clipboardExpand all lines: content/commands/bf.card.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,15 +41,6 @@ is key name for a Bloom filter.
41
41
42
42
</details>
43
43
44
-
## Return value
45
-
46
-
Returns one of these replies:
47
-
48
-
-[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.
49
-
-[] on error (invalid arguments, wrong key type, etc.)
50
-
51
-
Note: when `key` exists - return the same value as `BF.INFO key ITEMS`.
52
-
53
44
## Examples
54
45
55
46
{{< highlight bash >}}
@@ -60,3 +51,24 @@ redis> BF.CARD bf1
60
51
redis> BF.CARD bf_new
61
52
(integer) 0
62
53
{{< / highlight >}}
54
+
55
+
## Return information
56
+
57
+
{{< multitabs id="bf-card-return-info"
58
+
tab1="RESP2"
59
+
tab2="RESP3" >}}
60
+
61
+
One of the following:
62
+
*[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.
63
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full.
64
+
65
+
Note: when `key` exists, `BF.CARD` returns the same value as `BF.INFO key ITEMS`.
66
+
67
+
-tab-sep-
68
+
69
+
One of the following:
70
+
*[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.
71
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when the filter is full.
72
+
73
+
Note: when `key` exists, `BF.CARD` returns the same value as `BF.INFO key ITEMS`.
Copy file name to clipboardExpand all lines: content/commands/bf.exists.md
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,13 +48,6 @@ is key name for a Bloom filter.
48
48
is an item to check.
49
49
</details>
50
50
51
-
## Return value
52
-
53
-
Returns one of these replies:
54
-
55
-
-[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.
56
-
-[] on error (invalid arguments, wrong key type, etc.)
57
-
58
51
## Examples
59
52
60
53
{{< highlight bash >}}
@@ -65,3 +58,21 @@ redis> BF.EXISTS bf item1
65
58
redis> BF.EXISTS bf item2
66
59
(integer) 0
67
60
{{< / highlight >}}
61
+
62
+
## Return information
63
+
64
+
{{< multitabs id="bf-exists-return-info"
65
+
tab1="RESP2"
66
+
tab2="RESP3" >}}
67
+
68
+
One of the following:
69
+
*[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.
70
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) if invalid arguments are passed.
71
+
72
+
-tab-sep-
73
+
74
+
One of the following:
75
+
*[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.
76
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) if invalid arguments are passed or `key` is not of the correct type.
Copy file name to clipboardExpand all lines: content/commands/bf.info.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,20 +84,6 @@ Return the number of items that were added to this Bloom filter and detected as
84
84
Return the expansion rate.
85
85
</details>
86
86
87
-
When no optional argument is specified: return all information fields.
88
-
89
-
## Return value
90
-
91
-
When no optional argument is specified, returns one of these replies:
92
-
93
-
-[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
94
-
-[] on error (invalid arguments, key does not exist, wrong key type, and so on)
95
-
96
-
When an optional argument is specified, returns one of these replies:
97
-
98
-
-[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}) - argument value
99
-
-[] on error (invalid arguments, key does not exist, wrong key type, and so on)
100
-
101
87
## Examples
102
88
103
89
{{< highlight bash >}}
@@ -117,3 +103,21 @@ redis> BF.INFO bf1
117
103
redis> BF.INFO bf1 CAPACITY
118
104
1) (integer) 100
119
105
{{< / highlight >}}
106
+
107
+
## Return information
108
+
109
+
{{< multitabs id="bf-info-return-info"
110
+
tab1="RESP2"
111
+
tab2="RESP3" >}}
112
+
113
+
One of the following:
114
+
*[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.
115
+
*[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.
116
+
117
+
-tab-sep-
118
+
119
+
One of the following:
120
+
*[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.
121
+
*[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.
Copy file name to clipboardExpand all lines: content/commands/bf.insert.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,15 +118,6 @@ If the number of elements to be stored in the filter is unknown, use an `expansi
118
118
Otherwise, use an `expansion` of `1` to reduce memory consumption. The default value is `2`.
119
119
</details>
120
120
121
-
## Return value
122
-
123
-
Returns one of these replies:
124
-
125
-
-[Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) where each element is one of these options:
126
-
-[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)
127
-
-[] when the item cannot be added because the filter is full
128
-
-[], for example, when the number of arguments or key type is wrong, and also when `NOCREATE` is specified and `key` does not exist.
129
-
130
121
## Examples
131
122
132
123
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
146
137
{{< highlight bash >}}
147
138
BF.INSERT filter NOCREATE ITEMS foo bar
148
139
{{< / highlight >}}
140
+
141
+
## Return information
142
+
143
+
{{< multitabs id="bf-insert-return-info"
144
+
tab1="RESP2"
145
+
tab2="RESP3" >}}
146
+
147
+
One of the following: where each element is one of these options:
148
+
*[Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is one of the following options:
149
+
*[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.
150
+
*[Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the item cannot be added because the filter is full.
151
+
*[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.
152
+
153
+
-tab-sep-
154
+
155
+
One of the following: where each element is one of these options:
156
+
*[Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each element is one of the following options:
157
+
*[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.
158
+
*[Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings">}}) when the item cannot be added because the filter is full.
159
+
*[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.
See [`BF.SCANDUMP`]({{< relref "commands/bf.scandump/" >}}) for an example.
74
+
One of the following:
75
+
*[Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
76
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed.
77
+
78
+
-tab-sep-
79
+
80
+
One of the following:
81
+
*[Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
82
+
*[Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, wrong key type, or when invalid data was passed.
*[Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) where each element is either
84
+
* 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.
85
+
* a [simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) when the item cannot be added because the filter is full.
86
+
*[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.
87
+
88
+
-tab-sep-
89
+
90
+
One of the following:
91
+
*[Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) where each element is either
92
+
* 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.
93
+
* a [simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) when the item cannot be added because the filter is full.
94
+
*[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.
Copy file name to clipboardExpand all lines: content/commands/bf.mexists.md
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,13 +50,6 @@ is key name for a Bloom filter.
50
50
One or more items to check.
51
51
</details>
52
52
53
-
## Return value
54
-
55
-
Returns one of these replies:
56
-
57
-
-[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.
58
-
-[] on error (invalid arguments, wrong key type, etc.)
*[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.
73
+
*[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.
74
+
75
+
-tab-sep-
76
+
77
+
One of the following:
78
+
*[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.
79
+
*[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.
0 commit comments