Getting geospatial indexes to work in MongoDB 1.4.3
Posted
by Marcel J.
on Stack Overflow
See other posts from Stack Overflow
or by Marcel J.
Published on 2010-06-17T19:23:34Z
Indexed on
2010/06/17
20:33 UTC
Read the original article
Hit count: 428
mongodb
|mongomapper
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?
© Stack Overflow or respective owner