-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.3.3
-
Component/s: Index Maintenance
-
None
-
Environment:OSX
When indexing an array field for lat/long:
{ location : [70, -70] }for a collection, it will error out if not all objects in the collection have the location array populated. So, if you have 10 objects and 1 does not have a lat/long, it will error out.
Here is the console output:
> db.hotels.ensureIndex(
{location : '2d'})
geo field[location] has to be an Object or Array
It seems like this should not error out, but rather skip over the ones that are not populated.