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.add.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
-
Adds an item to a bloom filter, if the specified bloom filter does not exist creates a bloom filter with default configurations with that name.
1
+
Adds a single item to a bloom filter. If the specified bloom filter does not exist, a bloom filter is created with the provided name with default properties.
2
2
3
-
If you want to create a bloom filter with non-standard options, use the `BF.INSERT` or `BF.RESERVE` command.
3
+
To add multiple items to a bloom filter, you can use the BF.MADD or BF.INSERT commands.
4
+
5
+
If you want to create a bloom filter with non-default properties, use the `BF.INSERT` or `BF.RESERVE` command.
Determines if an item has been added to the bloom filter.
1
+
Determines if an item has been added to the bloom filter previously.
2
2
3
3
A Bloom filter has two possible responses when you check if an item exists:
4
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
5
+
* 0 - The item definitely does not exist since with bloom filters, false negatives are not possible.
8
6
7
+
* 1 - The item exists with a given false positive (fp) percentage. There is an fp rate % chance that the item does not exist. You can create bloom filters with a more strict false positive rate as needed.
9
8
10
9
## Examples
11
10
@@ -14,6 +13,6 @@ A Bloom filter has two possible responses when you check if an item exists:
Copy file name to clipboardExpand all lines: commands/bf.info.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
Returns information about a bloom filter
1
+
Returns usage information and properties of a specific bloom filter
2
2
3
3
## Info Fields
4
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
5
+
* CAPACITY - The number of unique items that would need to be added before a scale out occurs or (non scaling) before it rejects addition of unique items.
6
+
* SIZE - The number of bytes allocated by this bloom filter.
7
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
8
+
* ITEMS - The number of unique items that have been added to the bloom filter
9
+
* ERROR - The false positive rate of the bloom filter
10
+
* EXPANSION - The expansion rate of the bloom filter. Non scaling filters will have an expansion rate of nil.
11
11
* MAXSCALEDCAPACITY - Returns the maximum capacity that can be reached before an error occurs
12
12
13
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
Copy file name to clipboardExpand all lines: commands/bf.insert.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,18 @@
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
1
+
If the bloom filter does not exist under the specified name, a bloom filter is created with the specified parameters. Default properties will be used if the options below are not specified.
2
+
3
+
When the ITEMS option is provided, all items provided will be attempted to be added.
2
4
3
5
## Insert Fields
4
6
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
7
+
* CAPACITY `capacity` - The number of unique items that would need to be added before a scale out occurs or (non scaling) before it rejects addition of unique items.
8
+
* ERROR `fp_error` - The false positive rate of the bloom filter
9
+
* EXPANSION `expansion` - This option will specify the bloom filter as scaling and controls the size of the sub filter that will be created upon scale out / expansion of the bloom filter.
8
10
* NOCREATE - Will not create the bloom filter and add items if the filter does not exist already
9
11
* 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
12
+
* SEED `seed` - The seed the hash functions will use
13
+
* NONSCALING - This option will configure the bloom filter as non scaling; it cannot expand / scale beyond its specified capacity.
14
+
* VALIDATESCALETO `validatescaleto` - Validates if the filter can scale out and reach to this capacity based on limits and if not, return an error without creating the bloom filter
15
+
* ITEMS `item` - One or more items to be added to the bloom filter
14
16
15
17
Due to the nature of NONSCALING and VALIDATESCALETO arguments, specifying NONSCALING and VALIDATESCALETO isn't allowed
16
18
@@ -20,7 +22,7 @@ Due to the nature of NONSCALING and VALIDATESCALETO arguments, specifying NONSC
20
22
127.0.0.1:6379> BF.INSERT key ITEMS item1 item2
21
23
1) (integer) 1
22
24
2) (integer) 1
23
-
# This does not update the capcity but uses the origianl filters values
25
+
# This does not update the capacity since the filter already exists. It only adds the provided items.
Loads a bloom filter from a dump of an existing bloom object with all the properties and bit vector dump.
1
+
Restores a bloom filter from a dump of an existing bloom filter with all of its specific the properties and bit vector dump of sub filter/s. This command is only generated during AOF Rewrite to restore a bloom filter in the future.
Copy file name to clipboardExpand all lines: commands/bf.madd.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
Adds one or more items to a Bloom Filter, if the bloom filter does not exist creates a default bloom filter.
1
+
Adds one or more items to a bloom filter. If the specified bloom filter does not exist, a bloom filter is created with the provided name with default properties
2
2
3
-
If you want to create a bloom filter with non-standard options, use the `BF.INSERT` or `BF.RESERVE` command.
3
+
If you want to create a bloom filter with non-default properties, use the `BF.INSERT` or `BF.RESERVE` command.
Copy file name to clipboardExpand all lines: commands/bf.mexists.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
Determines if one or more items has been added to a bloom filter.
1
+
Determines if the provided item/s have been added to a bloom filter previously.
2
2
3
3
A Bloom filter has two possible responses when you check if an item exists:
4
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.
5
+
*0 - The item definitely does not exist since with bloom filters, false negatives are not possible.
6
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
7
+
*1 - The item exists with a given false positive (fp) percentage. There is an fp rate % chance that the item does not exist. You can create bloom filters with a more strict false positive rate as needed.
Copy file name to clipboardExpand all lines: commands/bf.reserve.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
-
Creates an empty bloom object with the capacity and false positive rate specified
1
+
Creates an empty bloom filter with the capacity and false positive rate specified. By default, a scaling filter is created with the default expansion rate.
2
+
3
+
To specify the scaling / non scaling nature of the bloom filter, use the options: NONSCALING or SCALING <expansionrate>. It is invalid to provide both options together.
2
4
3
5
## Reserve fields
4
6
5
-
* error_rate - The false positive rate the bloom filter will be created with
6
-
* capacity - The starting capacity the bloom filter will be created with
7
-
* EXPANSION expansion - The rate in which filters will increase by
8
-
* NONSCALING - Setting this will make it so the bloom object can’t expand past its initial capacity
7
+
* error_rate - The false positive rate of the bloom filter
8
+
* capacity - The number of unique items that would need to be added before a scale out occurs or (non scaling) before it rejects addition of unique items.
9
+
* EXPANSION expansion - This option will specify the bloom filter as scaling and controls the size of the sub filter that will be created upon scale out / expansion of the bloom filter.
10
+
* NONSCALING - This option will configure the bloom filter as non scaling; it cannot expand / scale beyond its specified capacity.
0 commit comments