TOPK.QUERY

Syntax
TOPK.QUERY key item [item ...]
Available in:
Redis Stack / Bloom 2.0.0
Time complexity:
O(n) where n is the number of items

Checks whether an item is one of Top-K items. Multiple items can be checked at once.

Parameters

  • key: Name of sketch where item is queried.
  • item: Item/s to be queried.

Return

Array reply of Integer reply - "1" if item is in Top-K, otherwise "0".

Examples

redis> TOPK.QUERY topk 42 nonexist
1) (integer) 1
2) (integer) 0

Rate this page