You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used GeoPoint parse field type, as described in documentation but did not succeed trying to use {"$within": {"$box": {[southwestGeoPoint, northeastGeoPoint]}}} for queries, it always return empty results. Then I tried to reproduce everything with mongo shell, and there is a difference between GeoPoint which is created in parse and a way which is described in mongo docs
Output when creating GeoPoint field manually according to mongo docs is
Output when creating GeoPoint field with parse server as documented "__type": "GeoPoint", "latitude": 40.0, "longitude": -30.0
"location" : [
37.6225,
55.7512
],
In first case Geo Queries works, in second does not. I'm new to mongo geo data, so maybe there is some confusion with mongo versions or engine about which i don't know.
Thanks!
Environment Setup
Server
parse-server version (Be specific! Don't say 'latest'.) : 2.6.5
Operating System: mac os
Hardware: macbook air
Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
Oh, I'm sorry it was my mistake, the query some how works fine. But still there is a difference in types which actually confused me at first and I thought it was a reason
Activity
flovilmart commentedon Nov 26, 2017
Can you provide the logs when running with VERBOSE=1 for this query please?
eddyLazar commentedon Nov 28, 2017
used curl example from docs http://docs.parseplatform.org/rest/guide/#geopoint
mongo version 3.4
flovilmart commentedon Nov 28, 2017
Your curl only shows creating an object with a single point, can you please provide the query logs?
eddyLazar commentedon Nov 29, 2017
flovilmart commentedon Nov 29, 2017
the query you’re sending is not using polygons as constraints. Is that intended?
eddyLazar commentedon Nov 29, 2017
Oh, I'm sorry it was my mistake, the query some how works fine. But still there is a difference in types which actually confused me at first and I thought it was a reason
from parse
from mongo
Is it by design? Anyway issue can be closed. Thanks a lot for your response
flovilmart commentedon Nov 29, 2017
Yes it’s by design, the way data is stored is not 1-1 from mongo to parse, you’ll see also that ACL’s are split to have a better index performance.