summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/zpopmax.md
blob: dea7a1630a1f2d1d10087a572950e8c1f0ab3ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Removes and returns up to `count` members with the highest scores in the sorted
set stored at `key`.

When left unspecified, the default value for `count` is 1. Specifying a `count`
value that is higher than the sorted set's cardinality will not produce an
error. When returning multiple elements, the one with the highest score will be
the first, followed by the elements with lower scores.

@return

@array-reply: list of popped elements and scores.

@examples

```cli
ZADD myzset 1 "one"
ZADD myzset 2 "two"
ZADD myzset 3 "three"
ZPOPMAX myzset
```