如何在redis中查询精确的整数数据

how to query exact integer data in redis

我有这样的redis数据

HMSET cars:1 make Ferrari model 458 color red topSpeed 202
HMSET cars:2 make Porsche model 555 color yellow topSpeed 300

ZADD topSpeed 202 1
ZADD topSpeed 300 2

范围查询:ZRANGEBYSCORE topSpeed 200 300

那么如何查询exact topSpeed like 202 ?

ZRANGEBYSCORE topSpeed 202 202

来自the documentation

Returns all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max).