TOPK.COUNT
As of Bloom version 2.4, this command is regarded as deprecated.
Syntax
TOPK.COUNT 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, - Compatibility:
- Redis Enterprise and Redis Cloud compatibility
Returns counts for each item present in the sketch. Multiple items can be requested at once. Please note this number will never be higher than the real count and will likely be lower.
This command has been deprecated. The count value is not a representative of the number of appearances of an item.
Parameters
- key: the name of the sketch where items are to be counted.
- item: the items to be counted.
Examples
redis> TOPK.COUNT topk foo 42 nonexist
1) (integer) 3
2) (integer) 1
3) (integer) 0
Redis Enterprise and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Supported |
✅ Flexible & Annual ✅ Free & Fixed |
Return information
One of the following:
- Array of integer replies representing the count of each specified item. For non-existant items,
0is returned. - Simple error reply in these cases: incorrect number of arguments, non-existant key, or key of the incorrect type.