查询一个2d索引
最后更新于
db.places.find( { loc: { $geoWithin :
{ $center : [ [-74, 40.74 ] , 10 ]
} } } )db.<collection>.find( { <location field> :
{ $geoWithin :
{ $centerSphere : [ [ <x>, <y> ] , <radius> ] }
} } )db.<collection>.find( { loc : { $geoWithin :
{ $centerSphere :
[ [ 88 , 30 ] , 10 / 3963.2 ]
} } } )db.<collection>.find( { <location field> :
{ $near : [ <x> , <y> ]
} } )db.<collection>.find( { loc: [ <x> , <y> ] } )