My collection
{"_id" : ObjectId("58240d6eb3fe299a1f28bdf0"),
"id" : NumberLong(52),
"user_id" : NumberLong(2),
"user_type" : "user",
"type_id" : "399278",
"type" : "poi",
"type_name" : "Kala Ghoda Amphitheatre",
"attending" : NumberLong(0),
"domain" : "",
"track_time" : "0000-00-00 00:00:00",
"latitude" : "18.92728500",
"longitude" : "72.83274200",
"fb_postid" : "",
"event_date" : "0000-00-00",
"m_event_date" : NumberLong("-62169984000"),
"m_type_id" : "poi__399278",
"loc" : {
"type" : "Point",
"coordinates" : [
18.927285,
72.832742
]
}
Create index db.user_tracking.ensureIndex({ "loc": "2dsphere" })
I have this error:
"ok" : 0,
"errmsg" : "Can't extract geo keys: { _id: ObjectId('58240d6eb3fe299a1f28bdf1'), id: 84, user_id: 2, user_type: \"wcities\", type_id: \"23621\", type: \"poi\", type_name: \"Alcatraz Island\", attending: 1, domain: \"Parrot\", track_time: \"2015-02-02 06:33:34\", latitude: \"37.82668800\", longitude: \"-122.42302500\", fb_postid: \"\", event_date: \"0000-00-00\", m_event_date: -62169984000, m_type_id: \"poi__23621\", loc: { type: \"Point\", coordinates: [ 37.826688, -122.423025 ] } } longitude/latitude is out of bounds, lng: 37.8267 lat: -122.423",
"code" : 16755
}