Skip to content

Instantly share code, notes, and snippets.

@frazerwilson2
Created March 11, 2019 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frazerwilson2/6167b7ad9e3cf41998e8d7526ffc23ad to your computer and use it in GitHub Desktop.
Save frazerwilson2/6167b7ad9e3cf41998e8d7526ffc23ad to your computer and use it in GitHub Desktop.
GET dd.dev.professional/_search
{
"query": {
"bool" : {
"must" : {
"match_all" : {}
},
"filter" : {
"geo_distance" : {
"distance" : "200km",
"location.geopoint" : {
"lat" : 48.8588376,
"lon" : 2.2768489
}
}
}
}
},
"aggs": {
"specialismCounts": {
"nested": {
"path": "specialisms"
},
"aggs": {
"specialismCounts": {
"terms": {
"field": "specialisms.slug"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment