[SERVER-9389] Querying 2d indexes with $exists:false fails and the error message is incorrect Created: 18/Apr/13 Updated: 11/Jul/16 Resolved: 12/Nov/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo, Querying |
| Affects Version/s: | 2.5.3 |
| Fix Version/s: | 2.5.4 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Steve Schlotter | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 1 |
| Labels: | query_triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OSX 10.7.5 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
When attempting to find ungeocoded documents I'm getting a misleading error. db.accounts.find({"locations.coordinates":{"$exists":false}}) returns this error; "$err" : "geo field only has 1 element :: caused by :: $exists: false", None of my coordinates have only one element. db.accounts.find({"locations.coordinates":{"$exists":true}}) is successful. |
| Comments |
| Comment by David Storch [ 12/Nov/13 ] | ||||||||||||
|
This affects version 2.5.3, but appears to be fixed in 2.5.4-pre (git hash 3c707bd5a995776d70cc740a0c7220c5986aacde):
Resolving as fixed and attaching a js regression test. | ||||||||||||
| Comment by Paul Klimashkin [ 05/Aug/13 ] | ||||||||||||
|
From version 2.4 this works ) and null | ||||||||||||
| Comment by Thyago Schleuss [ 04/Jun/13 ] | ||||||||||||
|
I have the same problem. I need to find documents without the location field. |