BF.EXISTS

Syntax

  1. BF.EXISTS key item

Time complexity: O(1)

ACL categories: @bloom

Checks for the existence of a single item in a Bloom filter key.

Return

Integer reply:

  • 1 if the item exists with a high probability.
  • 0 if the item definitely does not exist.

Examples

  1. dragonfly> BF.ADD bf Hello
  2. (integer) 1
  3. dragonfly> BF.EXISTS bf Hello
  4. (integer) 1
  5. dragonfly> BF.EXISTS bf World
  6. (integer) 0

See also

BF.ADD | BF.MEXISTS