Hi all,
I want to display unique count of container_id's for each state. I want to do a bucket aggregation to get the latest state of the container and then do a unique count of the containers for each state
to get the latest state of the container I have this
GET /my_index/_search
{
"aggs":{
"top_tags":{
"terms":{
"field":"container_id.keyword"
},
"aggs":{
"top_sales_hits":{
"top_hits":{
"sort":[
{
"actionTime":{
"order":"desc"
}
}
],
"_source":{
"includes":[
"container_id",
"state",
"actionTime"
]
},
"size":1
}
}
}
}
}
}
I am new to Vega , if there is any other way to display this also I am open to suggestions.
Thank you