ZPOPMIN
Note
Official reference: ZPOPMIN.
Pop the lowest-scoring members.
Syntax
ZPOPMIN key [count]
Omit count to pop one member; otherwise pop at most count members.
Results
| Return | Rows | Content |
|---|---|---|
| ResultSet | multiple | ELEMENT field, STRING type SCORE field, DOUBLE type |
Caution
Omitting count on an empty set can currently fail. Supply an explicit count when the set may be empty, such as 1 in the example.
Example
ZADD demo:ranking 10 alice 20 bob
ZPOPMIN demo:ranking 1