[フレーム]
Docs Pricing
Login Book a meeting Try Redis

TOPK.ADD

Syntax
TOPK.ADD key items [items ...]
Available in:
Redis Open Source / Bloom 2.0.0
Time complexity:
O(n * k) where n is the number of items and k is the depth
ACL categories:
@topk, @write, @slow,
Compatibility:
Redis Enterprise and Redis Cloud compatibility

Adds an item to a Top-k sketch. Multiple items can be added at the same time. If an item enters the Top-K sketch, the item that is expelled (if any) is returned. This allows dynamic heavy-hitter detection of items being entered or expelled from Top-K sketch.

Parameters

Example

redis> TOPK.ADD topk foo bar 42
1) (nil)
2) baz
3) (nil)

Redis Enterprise and Redis Cloud compatibility

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

Return information

One of the following:

RATE THIS PAGE
Back to top ↑

AltStyle によって変換されたページ (->オリジナル) /