Double Aggregation metric visualization

Hi there,

I'm new to Kibana and I'm trying to make a metric visualization (for now) based on a query dsl. The query is something like this:

GET idx/_search
{
"aggs": {
"top_tags": {
"terms": {
"field": "anObjectUUID"
},
"aggs": {
"top_sales_hits": {
"top_hits": {
"sort": [
{ "timestamp": "order": "desc" }
}
],
"size" : 1
}
}
}
}
}
}

Basically I want to get the most recent image of an object and then filter on top of that in the visualizations.

Thank you in advance.
Cheers

Hey, should be able to do. Are you having any issues making the visualization?

Hi @jbudz

Thank you for your answer, I forgot to say that I want to count all occurrences based on a filter.

For instance, I want to have a metric that says that I have 15 trues (filter), being those 15 the most recent version for each object.

I hope this was clear,

Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.