-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
query.withinMiles() will not work while query.near() works fine #2075
Comments
We have lots of passing test cases that cover these features. Can you post some code that reliably reproduces your issue, including the code that creates the data? Ideally as a test case we can add to our test suite. |
This is the exact code that I'm using. Do you see something wrong that I'm doing?
I don't have access to the code that creates the data unfortunately. Regardless, this is the shape of the location data in mongo: "currentLocation": [ |
We have multiple tests for the If you aren't using mongodb version 3.0.8, try switching to that version, as other versions have had some issues with geo queries. |
We are closing this issue due to a lack of sufficient information. Please refer to this issue for an example of a great bug report. You may use Server Fault for questions about managing Parse Server. For code-level and/or implementation-related questions or technical support, please refer to Stack Overflow. |
I've been trying, to no avail, to get the withinMiles query method to work. From what I can tell, withinMiles calls withinRadians calls near, and the only difference is the $maxDistance property is applied to the query. Below are the methods I'm using for both the withinMiles method and the near method:
Near runs and returns many objects from the database. withinMiles runs and returns an empty array. As you can see, at face value, it's the exact same method call, with the exact same properties, other than the maxDistance argument for withinMiles. maxDistance, for reference, is a Number value as required by the API.
I find it hard to believe that this is a bug, but from everything I can tell, it is. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: