question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect results if not specifying nativeGeo when the redis server supports native geo command

See original GitHub issue

Hi,

I am using redis server 3.2.3 which supports native geo command. I found that if I call nearby() function with the following options, the results will be very limited (I guess the unit used isn’t correct)

{
  withCoordinates: true,
  withDistances: true,
  units: 'mi',
  accurate: true
}

My peer uses old redis server (3.0.7), it works fine with the same code. Then I tried to append nativeGeo: true on initialization, everything goes well. But my server doesn’t support native geo command, it will be great and better let the lib determine whether to use native command.

Thanks :]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
arjunmehtacommented, Mar 24, 2017

@seoker I’ve address this in the latest release, 3.1.1.

Published to npm. I went with option 2 from above. A command queue is created and drained upon detection of the right interface.

1reaction
arjunmehtacommented, Apr 1, 2017

This makes sense. I’m realizing this is a major bug and it’s not an easy problem to solve, but there are two things I can do:

  1. The easiest thing to do would be to have a ready or initialized event. That can be used to know when to start using the module. Not the most intuitive or convenient solution.
  2. More time consuming to do would be to have a queue that is drained on initialization with the right interface. This would be invisible and seamless. This would take some time to develop and test, but is the ideal solution (in my opinion).

Anyway, I’ll give it a go soon.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-georedis/README.md at master - GitHub
Sort, limit, and get location and distance information of nearby query results. Defaults to use native Redis geo commands if available (means extra...
Read more >
GEOADD - Redis
The command will report an error when the user attempts to index coordinates outside the specified ranges. Note: there is no GEODEL command...
Read more >
Spring Data Redis
The Spring Data Redis project applies core Spring concepts to the development of solutions by using a key-value style data store.
Read more >
Configuring Redis - GitLab Documentation
Setting up a Redis-only server using Omnibus GitLab. If you'd like to set up Redis ... Google Cloud Memorystore does not support the...
Read more >
Redis - Laravel - The PHP Framework For Web Artisans
When defining a Redis transaction, you may not retrieve any values from the Redis connection. Remember, your transaction is executed as a single,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found