Skip to content

Instantly share code, notes, and snippets.

@bdargan
Created February 15, 2013 01:40
Show Gist options
  • Save bdargan/4957999 to your computer and use it in GitHub Desktop.
Save bdargan/4957999 to your computer and use it in GitHub Desktop.
elasticsearch geo queries
{
"query" : {
"match_all" : {}
},
"filter" : {
"geo_distance" : {
"distance" : "50km",
"location" : [-33.9, 151.175]
}
},
"sort" : [
{
"_geo_distance" : {
"location" : [-33.9, 151.175],
"order" : "asc",
"unit" : "km"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment