TOPK.查询

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

检查一个项目是否是Top-K项目之一。 可以同时检查多个项目。

参数

  • key: 查询项目的草图名称。
  • item: 要查询的项目。

返回

Array replyInteger reply - 如果项目在 Top-K 中,则为 "1",否则为 "0"。

示例

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

RATE THIS PAGE
Back to top ↑