I wanted to try geospatial indexes with MongoDB, but all I get is
> db.map_nodes.find( { coodinate: { $near: [54, 10] } } )
error: { "$err" : "invalid operator: $near" }
and
> db.map_nodes.runCommand({geoNear:"coordinates", near:[50,50]})
{
"errmsg" : "no such cmd",
"bad cmd" : {
"geoNear" : "coordinates",
"near" : [
50,
50
]
},
"ok" : 0
}
I am using MongoDB 1.4.3. What am I doing wrong?