[SERVER-12633] Query: Cannot hint with geo $near Created: 05/Feb/14 Updated: 21/Jul/14 Resolved: 21/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.5.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jonathan Abrahams | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||
| Description |
|
Specifying a hint when doing a geo $near query fails with an error:
|
| Comments |
| Comment by Jonathan Abrahams [ 05/Feb/14 ] | ||
|
Any hint fails, i.e.
| ||
| Comment by Scott Hernandez (Inactive) [ 05/Feb/14 ] | ||
|
So why do you think you can hint on another index? "... hint({geo: 1}) ..." is not valid given your indexes, which is not your hint. You might want to remove it from this issue since I don't think that is what this issue is about, is it? | ||
| Comment by Jonathan Abrahams [ 05/Feb/14 ] | ||
|
As listed in the steps section, the indexes were created as:
| ||
| Comment by Scott Hernandez (Inactive) [ 05/Feb/14 ] | ||
|
Did you create an index on {geo:1} or using "2d"? |