TOPK.LIST

TOPK.LIST key [WITHCOUNT]
Available in:
Redis Open Source / Bloom 2.0.0
Time complexity:
O(k) where k is the value of top-k
ACL categories:
@topk, @read, @slow,
Compatibility:
Redis Software and Redis Cloud compatibility

Return the full list of items in Top-K sketch.

Required arguments

key

the name of the sketch.

Optional arguments

WITHCOUNT

the count of each element is also returned.

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

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Supported
✅ Flexible & Annual
✅ Free & Fixed

Return information

k (or less) items in the given Top-k sketch. The list is sorted by decreased count estimation.

One of the following:

RATE THIS PAGE
Back to top ↑