We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29c9ba2 commit fbbfc80Copy full SHA for fbbfc80
source/geo.txt
@@ -208,16 +208,17 @@ from nearest to farthest.
208
209
# set query with point at MongoDB headquarters and a maxDistance of 1000 meters
210
query = {
211
- "location.geo": {
212
- "$near": {
+ "location.geo": {
+ "$near": {
213
"$geometry": {
214
+ # Search around this location
215
"type": "Point",
- "coordinates": [-73.986805, 40.7620853] # Search around this location
216
+ "coordinates": [-73.986805, 40.7620853]
217
},
218
"$maxDistance": 1000 # Distance in meters (1 km)
- }
219
220
+ }
221
222
223
# fetches the _id and theaterId fields
224
projection = { "theaterId": 1 }
0 commit comments