TOPK.QUERY

语法
TOPK.QUERY key item [item ...]
可用版本
Redis Open Source / Bloom 2.0.0
时间复杂度
O(n),其中 n 为项目数量
ACL 分类
@topk, @read, @slow,

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

参数

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

返回值

数组回复,包含整数回复 - 如果项目在 Top-K 中则返回 "1",否则返回 "0"。

示例

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

评价此页面
返回顶部 ↑
© . This site is unofficial and not affiliated with Redis, Inc.