Instantly share code, notes, and snippets.

Embed
What would you like to do?
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