Details
-
Bug
-
Resolution: Done
-
Major - P3
-
1.3.3
-
None
-
OSX
Description
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.