{ [MongoError: exception: geoNear command failed: { ok: 0.0, errmsg: "no geo indices for geoNear" }]
name: 'MongoError',
message: 'exception: geoNear command failed: { ok: 0.0, errmsg: "no geo indices for geoNear" }',
errmsg: 'exception: geoNear command failed: { ok: 0.0, errmsg: "no geo indices for geoNear" }',
code: 16604,
ok: 0 }
原因是你指定的 feild 的 index 不是坐标.
db.bingos.createIndex({loc: "2dsphere"})