Skip to content

Instantly share code, notes, and snippets.

@xeago
Created January 25, 2013 14:17
Show Gist options
  • Save xeago/4634745 to your computer and use it in GitHub Desktop.
Save xeago/4634745 to your computer and use it in GitHub Desktop.
{
"query": {
"filtered": {
"query": { "match_all" },
"filter": {
"and": [
{ "type": { "value": "vets" } },
{ "geo_polygon": {
"geoLocation": {
"points": [
{ "lat": "59.31637471031642", "lon": "4.603271484375" },
{ "lat": "58.32679897129091", "lon": "5.570068359375" },
{ "lat": "58.84785868573917", "lon": "7.40478515625" },
{ "lat": "59.65109171169264", "lon": "5.943603515625" }
]
}
}}
]
}
}
},
"facets": {
"indexType": {
"terms": {
"field": "indexType",
"order": "count",
"size": 25
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment