arjunmehta / node-georedis

Super fast geo queries.
MIT License
192 stars 33 forks source link

Get Nearby location items issues in local and AWS server. #25

Open prakashsam opened 6 years ago

prakashsam commented 6 years ago

Im using below options and get nearby orders :

var options = {
  withCoordinates: true, // Will provide coordinates with locations, default false
  withHashes: true, // Will provide a 52bit Geohash Integer, default false
  withDistances: true, // Will provide distance from query, default false
  order: 'ASC', // or 'DESC' or true (same as 'ASC'), default false
  units: 'km', // or 'km', 'mi', 'ft', default 'm'
  count: 100, // Number of results to return, default undefined
  accurate: true // Useful if in emulated mode and accuracy is important, default false
}

// look for all points within ~5000m of Toronto with the options.
geo.nearby({latitude: 43.646838, longitude: -79.403723}, 3, options, function(err, locations){
  if(err) console.error(err)
  else console.log('nearby locations:', locations)
})

Local Mechine : In my local mechine my using below version

Node Redis client: 2.71 Redis-Server : 2.4.6

Already set the orders with locations and using nearby location i can get the orders within 3kms.

AWS Server :

  Node Redis client: 2.71
  Redis-Server : 3.4

when emit 3km i can't get the orders and i can get orders within 0.68 Km only.

I can't get the solutions. Let me know if anything version problem.

arjunmehta commented 4 years ago

@prakashsam Sorry for the slow reply. I'm not sure if you were able to resolve the issue?

It may have been related to https://github.com/arjunmehta/node-georedis/issues/30

Sorry for taking so long to reply to this.