[SERVER-9453] $within $centerSphere no longer works in versions >2.2.3 Created: 24/Apr/13 Updated: 10/Dec/14 Resolved: 26/Jan/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Derek | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS X 10.8 |
||
| Operating System: | ALL |
| Steps To Reproduce: | Run a query with $near: { $centerSphere: components on 2.2.4. |
| Participants: |
| Description |
|
Given this query:
This worked fine up until version 2.2.3, which included a change that allows geo queries without a geospacial index. I'm unsure if this is related. When we switched to 2.2.3, we started seeing errors on these kinds of queries:
I went through the Mongo source to find where this error is thrown. It seems that centerSphere is no longer allowed for $within queries (see matcher.cpp L366-409). However, the only reason it's not allowed is because it isn't enumerated in the string of if-elses: if I simply remove the assertion in the 'else' case, the queries work as they used to. |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 26/Jan/14 ] | ||||||||
|
I tried your example in both 2.4.9 and latest master and it works fine in both versions.
| ||||||||
| Comment by Thomas Rueckstiess [ 25/Apr/13 ] | ||||||||
|
Hi Derek, Thanks for reporting this issue. We're trying to reproduce it on our side and will get back to you when we know more. Regards, |