Simple geoNear query with a GeoJSON Point as near value.
db.runCommand({ geoNear : "retail" , near : { type : "Point" , coordinates : [40.45500000000228 , -3.7269999999] } })
Response:
{
"ns" : "test.retail",
"errmsg" : "exception: geo values have to be numbers :: caused by :: { 0: \"Point\", 1: [ 40.45500000000228, -3.7269999999 ] }",
"code" : 13026,
"ok" : 0
}
Same query with legacy point structure:
db.runCommand({ geoNear : "retail" , near : [40.45500000000228 , -3.7269999999]})
Response:
{
"ns" : "test.retail",
"near" : "1001011111110001101100010110000111000010100110111000",
"results" : [
...
}