Hi,
I want to use 'ZSCAN' command but it throws the following.
Error:
Redis Error { [Error: ERR syntax error] command: 'ZSCAN', code: 'ERR' }
Code:
connection.zscan(key , 0 , {match : value + "*"} , function(err,data){
if(err){
console.log("Redis Error",err);
return err;
}else
cb(null,data);
});
Please guide me as to the proper usage of this. Thanks.
@vabnirvana The following should work:
client.zscan(key, 0, 'MATCH', value + '*', callback);
The object notation is only supported for HGETALL.
The result is ["0" , []] always empty array in all cases. Where as when i do the command in redis it gives me result.
I just wrote a test for it and it works as it should for me. Please check your key or pattern to really match your entries.
Most helpful comment
@vabnirvana The following should work:
The object notation is only supported for HGETALL.