TOPK.ADD key items [items ...]
@topk,
@write,
@slow,
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.
redis> TOPK.ADD topk foo bar 42
1) (nil)
2) baz
3) (nil)
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Supported |
✅ Flexible & Annual ✅ Free & Fixed |
One of the following: