[SERVER-9926] 2dsphere index requires field. "Can't parse geometry from element: location: null" Created: 13/Jun/13 Updated: 10/Dec/14 Resolved: 14/Jun/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo, Index Maintenance, Internal Code |
| Affects Version/s: | 2.4.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Maksims Mihejevs | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | indexing | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS X 64 bit |
||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | In terminal: }, { location: null } ]) ) { |
||||||||
| Participants: | |||||||||
| Description |
|
Trying to create 2dsphere index for collection on field that sometimes in null. |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 14/Jun/13 ] |
|
The difference between 2d and 2dsphere indexes is that the input data is validated in 2dsphere. The behavior you describe in 2d indexes is arguably a bug, but it would be backward breaking to change this behavior. Thus, you can happily insert {location: 'foo'}or {location: 1}into a 2d index as well. I think this ticket is what you really are looking for, however it is not yet scheduled: |