Redis - Sorted Set Zscore Command

Redis ZSCORE command returns the score of the member in the sorted set at the key. If the member does not exist in the sorted set, or the key does not exist, nil is returned.

Return Value

Bulk string reply, the score of member (a double precision floating point number), represented as string.


Following is the basic syntax of Redis ZSCORE command.

redis> ZSCORE key member


redis> ZADD myzset 1 b 2 c 3 d 4 e 
(integer) 4 
redis> ZSCORE myzset "c" 
(integer) 3 
redis> ZSCORE myzset "y"