TOPK.RESERVE key topk [width depth decay]
Initializes a TopK with specified parameters.
- key: Key under which the sketch is to be found.
- topk: Number of top occurring items to keep.
- width: Number of counters kept in each array. (Default 8)
- depth: Number of arrays. (Default 7)
- decay: The probability of reducing a counter in an occupied bucket. It is raised to power of it's counter (decay ^ bucket[i].counter). Therefore, as the counter gets higher, the chance of a reduction is being reduced. (Default 0.9)
Simple string reply -
OK if executed correctly, or  otherwise.
redis> TOPK.RESERVE topk 50 2000 7 0.925 OK