BF.EXISTS

Syntax
BF.EXISTS key item
Available in:
Redis Stack / Bloom 1.0.0
Time complexity:
O(k), where k is the number of hash functions used by the last sub-filter

Determines whether an item may exist in the Bloom Filter or not.

Parameters

  • key: The name of the filter
  • item: The item to check for

Return

Integer reply - where "1" value means the item may exist in the filter, and a "0" value means it does not exist in the filter.

Examples

redis> BF.EXISTS bf item1
(integer) 1
redis> BF.EXISTS bf item_new
(integer) 0