Sort set operation: Sort set adds a column to the set base for storing sequential sequences
Set Operation:
Zadd Key:zadd Key Sortnum value specifies that the key increment element, if value exists, update sortnum
Zrem:zrem key value deletes the value of the specified key
Zincrby:zincrby Key Sortnum value specifies that the sequence of key-value is self-increment and does not exist add
Zremrangebyrank zremrangebyrank Key POS1 pos2 Delete the specified key from small to large after ordering the elements in the POS1 to Pos2 range
Zremrangebyscore zremrangbyscore Key SORTNUM1 sortnum2 Delete the specified key from small to large after ordering the elements within SORTNUM1 to sortnum2
Query operation:
Zrange zrange key pos1 pos2 (withscores) query specifies key from POS1 to Pos2 value, from small to large, plus withscores outputs the sequence together
Zrevrange zrange key pos1 pos2 (withscores) query specifies key from POS1 to Pos2 value, small sort from avenue, plus withscores outputs the sequence together
Zrank:zrank key value is sorted from small to large, returning the subscript position of the specified Key-value
Zrevrank Zrevrank key value from large to small sort, returns the subscript position of the specified Key-value
Zrangebyscore zrangebyscore Key Sortnum1 sortnum2 Returns the value in the specified Sortnum size interval
Zcount:zcount Key Sortnum1 Sortnum2 Returns the number of value in the specified Sortnum size interval
Zcard:zcard Key returns the number of elements in key
Zscore Zscore key value returns the sequence of the specified key-value
Redis–sort set type operation