BF.ADD key item
@bloom,
@write,
@slow,
Adds an item to a Bloom filter.
This command is similar to BF.MADD, except that only one item can be added.
keyis key name for a Bloom filter to add the item to.
If key does not exist - a new Bloom filter is created with default error rate, capacity, and expansion (see BF.RESERVE).
itemis an item to add.
redis> BF.ADD bf item1
(integer) 1
redis> BF.ADD bf item1
(integer) 0| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Supported |
✅ Flexible & Annual ✅ Free & Fixed |
One of the following:
1 for successfully adding an item, or 0 if there's a probability that the item was already added to the filter.