Sunday 12 April 2015

ZREVRANK key member

Syntax
ZREVRANK key member
    Returns the rank of member in the sorted set, the member with the highest score has rank 0.

127.0.0.1:6379> zrange set1 0 15 withscores 
 1) "eleven" 
 2) "1" 
 3) "one" 
 4) "1" 
 5) "six" 
 6) "1" 
 7) "seven" 
 8) "2" 
 9) "twelve" 
10) "2" 
11) "two" 
12) "2" 
13) "eight" 
14) "3" 
15) "thirteen" 
16) "3" 
17) "three" 
18) "3" 
19) "four" 
20) "4" 
21) "fourteen" 
22) "4" 
23) "nine" 
24) "4" 
25) "fifteen" 
26) "5" 
27) "five" 
28) "5" 
29) "ten" 
30) "5" 
127.0.0.1:6379> zrevrank set1 nine 
(integer) 3 
127.0.0.1:6379> 


 

Prevoius                                                 Next                                                 Home

No comments:

Post a Comment