Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在redis中查询精确整数数据_Redis_Node Redis - Fatal编程技术网

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

如何在redis中查询精确整数数据,redis,node-redis,Redis,Node 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 那么如何查询精确的速度 ZRANGEBYSCORE topSpeed 202

我有这样的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

那么如何查询精确的速度

ZRANGEBYSCORE topSpeed 202 202
发件人:

返回排序集中分数在最小值和最大值之间的所有元素(包括分数等于最小值或最大值的元素)

发件人:

返回排序集中分数在最小值和最大值之间的所有元素(包括分数等于最小值或最大值的元素)