TOPK.LIST

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

返回Top K列表中的完整项目列表。

参数

  • key: 项目计数的草图名称。
  • WITHCOUNT: 返回每个元素的计数。

返回

Top K 列表中的 k(或更少)项。

列表按减少的计数估计排序。

Array replySimple string reply - TopK 列表中项目的名称。 如果请求了 WITHCOUNT,则返回 Array replySimple string replyInteger reply 对,表示 TopK 列表中项目的名称及其计数。

示例

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 ↑