TOPK.LIST

Syntax
TOPK.LIST key [WITHCOUNT]
Available in:
Redis Stack / Bloom 2.0.0
Time complexity:
O(k) where k is the value of top-k

Return full list of items in Top K list.

Parameters

  • key: Name of sketch where item is counted.
  • WITHCOUNT: Count of each element is returned.

Return

k (or less) items in Top K list.

Array reply of Simple string reply - the names of items in the TopK list. If WITHCOUNT is requested, Array reply of Simple string reply and Integer reply pairs of the names of items in the TopK list and their count.

Examples

TOPK.LIST topk
1) foo
2) 42
3) bar
TOPK.LIST topk WITHCOUNT
1) foo
2) (integer) 12
3) 42
4) (integer) 7
5) bar
6) (integer) 2

RATE THIS PAGE
Back to top ↑