Sorted Set
ZADD
Add a member to a sorted set, or update its score if it already exists.
Arguments
The key of the sorted set.
options
Only update elements that already exist. Never add elements.
Only add new elements. Never update elements.
Return the number of elements added or updated.
When this option is specified ZADD acts like ZINCRBY. Only one score-element pair can be specified in this mode.
Response
The number of elements added to the sorted sets, not including elements already existing for which the score was updated.
If ch
was specified, the number of elements that were updated.
If incr
was specified, the new score of member
.
Was this page helpful?