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
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,14 @@
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
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,19 @@
1
-
Returns information about a bloomfilter
1
+
Returns information about a bloom filter
2
+
3
+
## Info Fields
4
+
5
+
* CAPACITY - Returns the number of unique items that would need to be added before scaling would happen
6
+
* SIZE - Returns the number of bytes allocated
7
+
* FILTERS - Returns the number of filters in the specified key
8
+
* ITEMS - Returns the number of unique items that have been added the the bloom filter
9
+
* ERROR - Returns the false positive rate for the bloom filter
10
+
* EXPANSION - Returns the expansion rate
11
+
* MAXSCALEDCAPACITY - Returns the maximum capacity that can be reached before an error occurs
2
12
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
13
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
+
5
+
* CAPACITY capacity - capacity for the initial bloom filter
6
+
* ERROR `fp_error` - The false positive rate for the bloom filter
7
+
* EXPANSION expansion - The expansion rate for a scaling filter
8
+
* NOCREATE - Will not create the bloom filter and add items if the filter does not exist already
9
+
* TIGHTENING `tightening_ratio` - The tightening ratio for the bloom filter
10
+
* SEED seed - The seed the hash functions will use
11
+
* NONSCALING - Will make it so the filter can not scale
12
+
* VALIDATESCALETO `validatescaleto` - Checks if the filter could scale to this capacity and if not show an error and don’t create the bloom filter
13
+
* ITEMS item - One or more items we will add to the bloom filter
2
14
3
-
## Arguments
4
15
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
16
16
17
## Examples
18
+
17
19
```
18
20
127.0.0.1:6379> BF.INSERT key ITEMS item1 item2
19
21
1) (integer) 1
@@ -28,13 +30,13 @@ Due to the nature of NONSCALING and VALIDATESCALETO arguments, specifying NONSC
Copy file name to clipboardExpand all lines: commands/bf.mexists.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,13 @@
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
0 commit comments