Skip to content

Instantly share code, notes, and snippets.

@zubair1024
Created April 7, 2019 10:51
Show Gist options
  • Save zubair1024/55b627d59fb79b56d1fdb92033b0f1aa to your computer and use it in GitHub Desktop.
Save zubair1024/55b627d59fb79b56d1fdb92033b0f1aa to your computer and use it in GitHub Desktop.
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