Created
February 15, 2013 01:40
-
-
Save bdargan/4957999 to your computer and use it in GitHub Desktop.
elasticsearch geo queries
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
{ | |
"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