-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Issuse with quering geopoints in parse-server #1246
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
Comments
Looking at the screenshot it seems that the root cause is
Have you tried adding an index manually? |
Thanks @codebreach, it works well now but when i try the same query with Rest API, parse-server always return all the geo objects although i have set the limit = 1. Please help me. |
@ldmtam that seems like an issue with the query code itself. Someone who is owner of the project can probably answer this better. |
Haven't had time to write a test case, but I have investigated this issue and can confirm that it occurs when using an $or query that is composed of two queries with separate "geoPoint" objects. When I do the same query with the usual parse server (api.parse.com) it does not fail. When I use my new parse-server with an $or query that is composed of one internal query with a geoPoint (nearSphere) object it works. Adding the second query with geoPoint makes it fail. Again, doing the $or with both geoPoint queries inside the $or works when using api.parse.com and not when using parse-server. |
For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
Environment Setup
Localhost with nodejs v4.4.1, mongdb v3.2, parse-server v2.2.2
Steps to reproduce
Logs/Trace
This is my query to get 3 nearest point

But when i excute it, the console show that had some errors with mongdb:

Please help me fix it, thanks.
The text was updated successfully, but these errors were encountered: