Reputation: 546143
I have a collection ('stops') with 14000 records imported from a CSV. Included in each record is some geospatial data, which I've converted into an array, so each essentially looks like this:
{
_id: ...,
// other fields
"loc": [
153.019073,
-27.467834
]
}
When I run db.stops.ensureIndex({ loc: '2d' })
it gives the error:
location object expected, location array not in correct format
I guess that something's wrong in one of the fields, but I can't figure out which one. Any ideas?
Upvotes: 0
Views: 593