Skip to content

Instantly share code, notes, and snippets.

@meDavid
Created May 5, 2017 11:57
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 meDavid/bb8a3a4975d5399b6be3d8b89ea1e67b to your computer and use it in GitHub Desktop.
Save meDavid/bb8a3a4975d5399b6be3d8b89ea1e67b to your computer and use it in GitHub Desktop.
POST _search
{
"aggs": {
"manufacturer": {
"terms": {"field": "manufacturer.keyword"}
},
"fuel_type": {
"terms": {"field": "fuel_type"}
},
"year": {
"terms": {"field": "year"}
},
"euro_standard": {
"terms": {"field": "euro_standard"}
},
"transmission_type": {
"terms": {"field": "transmission_type"}
},
"combined": {
"range": {
"field": "combined_metric",
"ranges": [
{"to": 10},
{"from": 10, "to": 12},
{"from": 12, "to": 15},
{"from": 15, "to": 20},
{"from": 20}
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment