BF.MEXISTS
Syntax
BF.MEXISTS key item [item ...]
- Available in:
- Redis Open Source / Bloom 1.0.0
- Time complexity:
- O(k * n), where k is the number of hash functions and n is the number of items
- ACL categories:
-
@bloom
,@read
,@slow
,
Determines whether one or more items were added to a Bloom filter.
This command is similar to BF.EXISTS
, except that more than one item can be checked.
Required arguments
key
is key name for a Bloom filter.
item...
One or more items to check.
Examples
redis> BF.MADD bf item1 item2
1) (integer) 1
2) (integer) 1
redis> BF.MEXISTS bf item1 item2 item3
1) (integer) 1
2) (integer) 1
3) (integer) 0
Return information
One of the following:
- Array reply of integer replies, where
1
means that, with high probability,item
was already added to the filter, and0
means thatkey
does not exist or thatitem
was definitely not added to the filter. - Simple error reply in these cases: in these cases: invalid arguments, wrong key type, or when the key was not found.