[SERVER-12987] $geoWithin does not return results Created: 02/Mar/14 Updated: 10/Dec/14 Resolved: 03/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavel Baranov | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||
| Participants: |
| Description |
Should return the inserted doc. |
| Comments |
| Comment by Benety Goh [ 03/Mar/14 ] | ||
|
You're welcome! | ||
| Comment by Pavel Baranov [ 03/Mar/14 ] | ||
|
Got it, it works with "geometry.location" Thank you! | ||
| Comment by Benety Goh [ 03/Mar/14 ] | ||
|
Can you change your query to run against "geometry.location"? Instead of
Try:
| ||
| Comment by Pavel Baranov [ 03/Mar/14 ] | ||
|
I'm confused. I don't need coordinates returned, I need _id returned and this query is not matching it but it should. } | ||
| Comment by Benety Goh [ 03/Mar/14 ] | ||
|
This is unsupported behavior. Running a $geoWithin query against 'geometry' should not return coordinates in nested field 'geometry.location'. It's a bug in 2.4: https://github.com/mongodb/mongo/blob/v2.4/src/mongo/db/matcher.cpp#L963 The code was intended to iterate over an array but also iterated into subdocuments. |