Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

TOPK.INFO

Last updated
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).

Field Meaning
k How many items the list keeps.
width Counters per row.
depth Number of counter rows.
decay The decay setting.
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.

127.0.0.1:6379> TOPK.RESERVE trending 10 100 5 0.95
OK
127.0.0.1:6379> TOPK.INFO trending
1) k
2) (integer) 10
3) width
4) (integer) 100
5) depth
6) (integer) 5
7) decay
8) "0.95"

Same fields as TOPK.INFO in RedisBloom.

TOPK.RESERVE, TOPK.LIST