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: commands/bf.exists.md
+7-5
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
-
Determines if a specified item has been added to the specified bloom filter.
2
-
Syntax
1
+
Determines if an item has been added to the bloom filter.
2
+
3
+
A Bloom filter has two possible responses when you check if an item exists:
4
+
5
+
* "No" (Definite) - If the filter says an item is NOT present, this is 100% certain. The item is definitely not in the set.
6
+
7
+
* "Maybe" (Probabilistic) - If the filter says an item IS present, this is uncertain. There's a chance it's a false positive. The item might be in the set, but may not be
3
8
4
-
## Arguments
5
-
* key (required) - A Valkey key of Bloom data type
6
-
* item (required) - The item that we are checking if it exists in the bloom object
Copy file name to clipboardexpand all lines: commands/bf.info.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
Returns information about a bloomfilter
1
+
Returns information about a bloom filter
2
+
3
+
## Info Fields
4
+
* CAPACITY - Returns the number of unique items that would need to be added before scaling would happen
5
+
* SIZE - Returns the number of bytes allocated
6
+
* FILTERS - Returns the number of filters in the specified key
7
+
* ITEMS - Returns the number of unique items that have been added the the bloom filter
8
+
* ERROR - Returns the false positive rate for the bloom filter
9
+
* EXPANSION - Returns the expansion rate
10
+
* MAXSCALEDCAPACITY - Returns the maximum capacity that can be reached before an error occurs
2
11
3
-
## Arguments
4
-
* key (required) - A valkey key of bloom data type
5
-
* CAPACITY (optional) - Returns the number of unique items that would need to be added before scaling would happen
6
-
* SIZE (optional) - Returns the memory size which is the number of bytes allocated
7
-
* FILTERS (optional) - Returns the number of filters in the specified key
8
-
* ITEMS (optional) - Returns the number of unique items that have been added the the Bloom filter
9
-
* ERROR (optional) - Returns the false positive rate for the bloom filter
10
-
* EXPANSION (optional) - Returns the expansion rate
11
-
* MAXSCALEDCAPACITY (optional) - Returns the maximum capacity that can be reached before an error occurs
12
12
If none of the optional fields are specified, all the fields will be returned. MAXSCALEDCAPACITY will be an unrecognized argument on non scaling filters
Creates a bloom object with the specified parameters. If a parameter is not specified then the default value will be used. If ITEMS is specified then it will also attempt to add all items specified after
1
+
Creates a bloom filter with the specified parameters. If a parameter is not specified then the default value will be used. If ITEMS is specified then it will also attempt to add all items specified
2
+
3
+
## Insert Fields
4
+
* CAPACITY capacity - capacity for the initial bloom filter
5
+
* ERROR `fp_error` - The false positive rate for the bloom filter
6
+
* EXPANSION expansion - The expansion rate for a scaling filter
7
+
* NOCREATE - Will not create the bloom filter and add items if the filter does not exist already
8
+
* TIGHTENING `tightening_ratio` - The tightening ratio for the bloom filter
9
+
* SEED seed - The seed the hash functions will use
10
+
* NONSCALING - Will make it so the filter can not scale
11
+
* VALIDATESCALETO `validatescaleto` - Checks if the filter could scale to this capacity and if not show an error and don’t create the bloom filter
12
+
* ITEMS item - One or more items we will add to the bloom filter
2
13
3
-
## Arguments
4
14
Due to the nature of NONSCALING and VALIDATESCALETO arguments, specifying NONSCALING and VALIDATESCALETO isn't allowed
5
-
* key (required) - Is the key name for a Bloom filter to add the item to
6
-
* CAPACITY capacity (optional) - capacity for the inital bloom filter
7
-
* ERROR fp_error (optional)- The false positive rate for the bloom filter
8
-
* EXPANSION expansion(optional) - The expansion rate for a scaling filter
9
-
* NOCREATE (optional) - Will not create the bloom filter and add items if the filter does not exist already
10
-
* TIGHTENING (optional) - The tightening ratio for the bloom filter
11
-
* SEED (optional) - The seed the hash functions will use
12
-
* NONSCALING (optional) - Will make it so the filter can not scale
13
-
* VALIDATESCALETO validatescaleto (optional) - Checks if the filter could scale to this capacity and if not show an error and don’t create the bloom filter
14
-
* ITEMS (optional) - Items we will add to the bloom filter
15
15
16
16
## Examples
17
17
```
@@ -28,13 +28,13 @@ Due to the nature of NONSCALING and VALIDATESCALETO arguments, specifying NONSC
Copy file name to clipboardexpand all lines: commands/bf.mexists.md
+8-4
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,11 @@
1
-
Determines if one or more items has been added to the specified bloom filter
2
-
## Arguments
3
-
* key (required) - A Valkey key of Bloom data type
4
-
* item (requires at least 1 item but can add as many as desired) - The item/s that we are checking if it exists in the bloom object
1
+
Determines if one or more items has been added to a bloom filter.
2
+
3
+
A Bloom filter has two possible responses when you check if an item exists:
4
+
5
+
* "No" (Definite) - If the filter says an item is NOT present, this is 100% certain. The item is definitely not in the set.
6
+
7
+
* "Maybe" (Probabilistic) - If the filter says an item IS present, this is uncertain. There's a chance it's a false positive. The item might be in the set, but may not be
Copy file name to clipboardexpand all lines: resp2_replies.json
+8-8
Original file line number
Diff line number
Diff line change
@@ -64,8 +64,8 @@
64
64
],
65
65
"BF.ADD": [
66
66
"One of the following:",
67
-
"* [Integer reply](../topics/protocol.md#integers): '1'. The item was successfully added",
68
-
"* [Integer reply](../topics/protocol.md#integers): '0'. The item already existed in the bloom filter",
67
+
"* [Integer reply](../topics/protocol.md#integers): `1` if the item was successfully added",
68
+
"* [Integer reply](../topics/protocol.md#integers): `0` if the item already existed in the bloom filter",
69
69
"",
70
70
"The command may fail with an error for several reasons: if the wrong number of arguments are provided, if attempting to add to a non scaling filter that is full"
71
71
],
@@ -76,23 +76,23 @@
76
76
],
77
77
"BF.EXISTS": [
78
78
"One of the following:",
79
-
"* [Integer reply](../topics/protocol.md#integers): '1'. The item exists in the bloom filter",
80
-
"* [Integer reply](../topics/protocol.md#integers): '0'. The bloom filter does not exist or the item has not been added to the bloom filter",
79
+
"* [Integer reply](../topics/protocol.md#integers): `1` if the item exists in the bloom filter",
80
+
"* [Integer reply](../topics/protocol.md#integers): `0` if the bloom filter does not exist or the item has not been added to the bloom filter",
81
81
"",
82
82
"The command will fail if the wrong number of arguments are provided"
83
83
],
84
84
"BF.INFO": [
85
85
"When no optional arguments are provided:",
86
-
"[Array reply](../topics/protocol.md#arrays): List of information about the bloom filter.",
87
-
"When an optional argument is provided:",
86
+
"* [Array reply](../topics/protocol.md#arrays): List of information about the bloom filter.",
87
+
"When an optional argument excluding ERROR is provided:",
"The command may fail with an error for several reasons: if the wrong number of arguments are provided, if trying to get MAXSCALEDCAPACITY of a non scaling filter"
92
93
],
93
94
"BF.INSERT": [
94
95
"[Array reply](../topics/protocol.md#arrays): Array of ints (1’s and 0’s) - if filter already exists or if creation was successful. An empty array if no items are provided",
95
-
"[String reply??](../topics/protocol.md#simple-strings): not found, if the filter does not exist and NOCREATE is specified",
96
96
"",
97
97
"The command may fail with an error for several reasons: if the wrong number of arguments are provided, if the provided VALIDATESCALETO is not possible, if the provided optional args are not valid"
Copy file name to clipboardexpand all lines: resp3_replies.json
+8-8
Original file line number
Diff line number
Diff line change
@@ -64,8 +64,8 @@
64
64
],
65
65
"BF.ADD": [
66
66
"One of the following:",
67
-
"* [Integer reply](../topics/protocol.md#integers): '1'. The item was successfully added",
68
-
"* [Integer reply](../topics/protocol.md#integers): '0'. The item already existed in the bloom filter",
67
+
"* [Integer reply](../topics/protocol.md#integers): `1` if the item was successfully added",
68
+
"* [Integer reply](../topics/protocol.md#integers): `0` if the item already existed in the bloom filter",
69
69
"",
70
70
"The command may fail with an error for several reasons: if the wrong number of arguments are provided, if attempting to add to a non scaling filter that is full"
71
71
],
@@ -76,23 +76,23 @@
76
76
],
77
77
"BF.EXISTS": [
78
78
"One of the following:",
79
-
"* [Integer reply](../topics/protocol.md#integers): '1'. The item exists in the bloom filter",
80
-
"* [Integer reply](../topics/protocol.md#integers): '0'. The bloom filter does not exist or the item has not been added to the bloom filter",
79
+
"* [Integer reply](../topics/protocol.md#integers): `1` if the item exists in the bloom filter",
80
+
"* [Integer reply](../topics/protocol.md#integers): `0` if the bloom filter does not exist or the item has not been added to the bloom filter",
81
81
"",
82
82
"The command will fail if the wrong number of arguments are provided"
83
83
],
84
84
"BF.INFO": [
85
85
"When no optional arguments are provided:",
86
-
"[Array reply](../topics/protocol.md#arrays): List of information about the bloom filter.",
87
-
"When an optional argument is provided:",
86
+
"* [Array reply](../topics/protocol.md#arrays): List of information about the bloom filter.",
87
+
"When an optional argument excluding ERROR is provided:",
"The command may fail with an error for several reasons: if the wrong number of arguments are provided, if trying to get MAXSCALEDCAPACITY of a non scaling filter"
92
93
],
93
94
"BF.INSERT": [
94
95
"[Array reply](../topics/protocol.md#arrays): Array of ints (1’s and 0’s) - if filter already exists or if creation was successful. An empty array if no items are provided",
95
-
"[String reply??](../topics/protocol.md#simple-strings): not found, if the filter does not exist and NOCREATE is specified",
96
96
"",
97
97
"The command may fail with an error for several reasons: if the wrong number of arguments are provided, if the provided VALIDATESCALETO is not possible, if the provided optional args are not valid"
0 commit comments