Sunday, 12 April 2015

ZRANK key member


Syntax
ZRANK key member
    Return the rank of the member in the sorted set. The member with the lowest 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> zrank set1 nine 
(integer) 11 


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment