sorted_set
在set的存储结构基础上添加可排序字段
基本操作:
1、添加
zadd key score1 member1 [score2 member2]
2、获取全部数据
zrang key start stop [WITHSCORES]
zrevrang key start stop [WITHSCORES]
3、删除
zrem key member ....
4、按条件获取数据
zrangebyscore key min max [WITHSCORES] [LIMIT]
zrevrangebyscore key max min [WITHSCORES]
5、条件删除数据
zremrangebyrank key start stop
zremrangebyscore key min max
6、获取集合数据总量
zcard key
zcount key min max
7、集合交、并
zinterstore destination key1 key2
zunionstore destination key1 key2
8、获取数据对应的索引
zrank key member
zrevrank key member
9、获取score值和修改
zscore key member
zincrby key increment member