Skip to main content

CF.MEXISTS

Syntax

CF.MEXISTS key item [item ...]

Time complexity: O(k * n), where k is the number of sub-filters and n is the number of items

ACL categories: @cuckoo

Checks whether one or more items exist in the Cuckoo filter at key. Returns one reply per item in the same order as the input.

Like CF.EXISTS, false positives are possible but false negatives are not. If key does not exist, 0 is returned for every item.

Return

Array reply of Integer replies, one per item:

  • 1 if the item exists (or is a false positive match).
  • 0 if the item does not exist.

Examples

dragonfly> CF.ADD cf Hello
(integer) 1

dragonfly> CF.ADD cf World
(integer) 1

dragonfly> CF.MEXISTS cf Hello World Missing
1) (integer) 1
2) (integer) 1
3) (integer) 0

dragonfly> CF.MEXISTS no_such_key a b c
1) (integer) 0
2) (integer) 0
3) (integer) 0

See also

CF.EXISTS | CF.ADD | CF.RESERVE