Zset ordered set common operation instruction
The ordered set is based on the set, adding a score value, such as the previous set is K v1 v2 v3, now Zset is k score1 v1 score2 v2 score3 v3
Zadd key score value [score value]
Adding elements to an ordered collection
Zrange key start stop [Withscores]
Intercepts a collection element based on a given start and end position
If the withscores is not with a parameter, only the value is shown, with this argument, the score and the value
Zrangebyscore key min Max [withscores] [limit offset count]
Get the contents of a collection element based on minimum and maximum fractions
The optional LIMIT parameter specifies the number and range of results returned
You can also use the left parenthesis, which means it does not contain boundary values.
Zrem Key value
Delete Element
Zcard Key
Gets the number of elements in an ordered collection
Zcount Key min Max
Gets the number of elements in the specified fractional interval
Zrank Key value
Gets the subscript corresponding to the given value
Zrevrank Key value
After the collection is flipped, gets the subscript for the given value
Zrevrange key start stop [Withscores]
Flip a Collection
Zrevrangebyscore key Max min [withscores] [limit offset count]
Gets the contents of the collection element based on the maximum and minimum fractions