Open Mohammad-Khalid95 opened 4 years ago
@Mohammad-Khalid95 Can you tell me which version of Redis you're using?
Never experienced this issue before, and the package has been tested with ioredis ^4.17.3
.
@arjunmehta i am also testing with ioredis ^4.17.3. can you please share an example , how to initailize geoRedis with ioredis?
@Mohammad-Khalid95 You can have a look a how the tests are set up https://github.com/arjunmehta/node-georedis/blob/master/test/testIORedisNative.js
So you would do:
const IORedis = require('ioredis');
const client = new IORedis();
const georedis = require('georedis');
const geo = georedis.initialize(client, { nativeGeo: true });
This is assuming you're using a version of Redis that supports native geo queries. This is why it's helpful for me to know which version of Redis you are using.
I am trying to use 'ioredis' with georedis but getting error
` const Redis = require("ioredis"); const redisClient = new Redis( config.get('database').redis.port, config.get('database').redis.ip);
let geo = require('georedis').initialize(redisClient); let driverslocations = geo.addSet('abc');`
getting this ERROR ReplyError: ERR syntax error. Try GEOADD key [x1] [y1] [name1] [x2] [y2] [name2