TOPK.INFO
TOPK.INFO key
- Group
- Top-K
- Complexity
- O(1)
- Arity
- -1 (at least 1 words, counting the command name)
- Flags
- fast
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- All plans
- On-Premise
- no license needed
TOPK.INFO returns the settings the Top-K at key was created with (see
TOPK.RESERVE).
Fields
Section titled “Fields”| Field | Meaning |
|---|---|
k |
How many items the list keeps. |
width |
Counters per row. |
depth |
Number of counter rows. |
decay |
The decay setting. |
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Top-K exists | Flat array of field names and values; decay is a bulk string |
Map; decay is a double |
Error replies: TopK: key does not exist, and WRONGTYPE.
Examples
Section titled “Examples”127.0.0.1:6379> TOPK.RESERVE trending 10 100 5 0.95OK127.0.0.1:6379> TOPK.INFO trending1) k2) (integer) 103) width4) (integer) 1005) depth6) (integer) 57) decay8) "0.95"Compatibility
Section titled “Compatibility”Same fields as TOPK.INFO in RedisBloom.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.