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.
key
is 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
).
item
is an item to add.
redis> BF.ADD bf item1
(integer) 1
redis> BF.ADD bf item1
(integer) 0
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.