I have a type called vehicle_type that has a field called built_year, I want to get a list of years of my vehicles.
I got a list of years with an aggregate (bucket)
{
"aggs": {
"years": {
"terms": {
"field": "built_year",
"size": 20
}
}
}
}
Is it possible to get a list of all the years in order (DESC or ASC).