Created
April 7, 2019 10:51
-
-
Save zubair1024/55b627d59fb79b56d1fdb92033b0f1aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.sensormessageevents.find({ | |
$and: [ | |
{ | |
geoJSON: { | |
$exists: true | |
} | |
}, | |
{ | |
geoJSON: | |
{ | |
$near: | |
{ | |
$geometry: { type: "Point", coordinates: [-0.3242414, 51.5844733] }, | |
$maxDistance: 5000 | |
} | |
} | |
} | |
] | |
}) | |
.projection({}) | |
.sort({ _id: -1 }) | |
.limit(100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment