一. 添加数据 ,score是排序依据 zadd key score1 member1 [score2 member2] 获取全部数据 zrange key start stop [WITHSCORES] zrevrange key start stop [WITHSCORES] 删除数据 zrem key member [member ...] 按条件获取数据 zrangebyscore key min max [WITHSCORES] [LIMIT] zrevrangebyscore key max min [WITHSCORES] 条件删除数据 zremrangebyrank key start stop zremrangebyscore key min ma min与max用于限定搜索查询的条件 start与stop用于限定查询范围,作用于索引,表示开始和结束索引 offset与count用于限定查询范围,作用于查询结果,表示开始位置和数据总量 获取集合数据总量 zcard key zcount key min max 集合交、并操作 zinterstore destination numkeys key [key ...] zunionstore destination numkeys key [key ...] 二. 获取数据对应的索引(排名) zrank key member zrevrank key member score值获取与修改 zscore key member zincrby key increment member