redis ZSCORE command
Translation results:
score
UK[skɔ:(r)] US[skɔr, skor]
n.Score; Score; Score; 20
v. Score; score; score; win
Third person singular: scores Plural: scores Present participle: scoring Past tense: scored Past participle: scored
redis ZSCORE commandsyntax
Function: Returns the score value of the member in the ordered set key.
Syntax: ZSCORE key member
Description: If the member element is not a member of the ordered set key, or key does not exist, return nil.
Available versions: >= 1.2.0
Time complexity: O(1)
Returns: member's score value, expressed in string form.
redis ZSCORE commandexample
redis> ZRANGE salary 0 -1 WITHSCORES # 测试数据 1) "tom" 2) "2000" 3) "peter" 4) "3500" 5) "jack" 6) "5000" redis> ZSCORE salary peter # 注意返回值是字符串 "3500"