TOPK.QUERY
Syntax
TOPK.QUERY key item [item ...]
- Available in:
- Redis Open Source / Bloom 2.0.0
- Time complexity:
- O(n) where n is the number of items
- ACL categories:
-
@topk
,@read
,@slow
,
Checks whether one or more items are one of the Top-K items.
Parameters
- key: the name of the sketch.
- item: the items to be queried.
Example
redis> TOPK.QUERY topk 42 nonexist
1) (integer) 1
2) (integer) 0
Return information
One of the following:
- Array of integer replies:
1
if an item is in the Top-K or0
otherwise. - Simple error reply in these cases: non-existant key or key of the incorrect type.