Reputation: 790
I have used Mongo Compass.. i want run following geospatial query in Mongo compass
db.restaurants.find( { location : { $geoWithin :
{ $centerSphere :
[ [ 88 , 30 ] , 10 / 3963.2 ]
} } } )
Above Query is actual query. and also i have 2 collection these are restaurants and neighborhoods..
Upvotes: 3
Views: 2655
Reputation: 2359
You can also click at any point on the map, hold shift key and drag the pointer to somewhere else. It will build a query for you. So you can use it as a sample for building your own.
Upvotes: 3
Reputation: 2995
Try to enter only the query object into the input field, without db.restaurants.find...
like so:
{ location : { $geoWithin :
{ $centerSphere :
[ [ 88 , 30 ] , 10 / 3963.2 ]
} } }
Upvotes: 0