zrevrank
ZREVRANK
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Return the reverse index (rank) of a member
Usage: zrevrank key member.
Indexes start from 0 for the highest score.
Example
| Command> | zrevrange city 0 -1 withscores |
| Result> |
0) 80 -> New York 1) 70 -> Beijing 2) 60 -> Seoul 3) 50 -> New Delhi |
| Command> | zrevrank city "New York" |
| Result> | 0 |
| Command> | zrevrank city "Seoul" |
| Result> | 2 |
Syntax
ZREVRANK key member
- Available since version 2.0.0.
- Time complexity is O(log(N)+M).
| Related commands | ZREVRANGE, LRANGE |
| Clients for Java | Jedis, Lettuce, Redisson | Clients for C | Hiredis |
| << ZRANK | ZREVRANK | ZSCORE >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
