[SOLVED] Metric: Count versus Term

Hi all,

I make some visualization in Kibana and i'm not sure to understand the difference between "Metric: Count" and "Term" for a sub-aggregation in the "Order By" part.

I get different results if I try one or the other. But I can't explain.

For me the "Metric: Count" counts the number of documents returned. But I can't explain the other... :confused:

Thanks for your help,
Alex

Hi Alexandre,

Yes, the "Order By" is affecting your results because of the Size field below that. So if you order by "Metric: Count" you get the top "size" results back based on the Count.
But if you can that to order by the Term (uses the field of that sub aggregation) then you get the top "size" results back of that term.

Regards,
Lee

Thanks for your reply.

May be it's a translation issue but I'm not sure to understand.

"Metric: Count" represent the number of documents returns ?
"Term" represent the number of documents matching some criteria ? For exemple "field:storm*"

Thanks,
Alex

In this visualization the Y-Axis is showing the Count of documents
and the x-axis is showing the top 20 terms in the name field.
And Order By: metric: Count shows Chrome first in the chart because it has the highest Count.

If I change my Y-Axis to Max bytes then that Order By choice changes to metric: Max bytes

Or I can leave the Y-Axis on Max bytes, and just change the Order By to Term. So now it's showing me the top 20 terms in order, and the Max bytes of each of them. Chrome starts with C and is still in that list, but Firefox isn't in the top 20 of the name field. So yes, it makes it return different data. If there were less than 20 terms for this field I think you would get the same results but only in a different order.

Thanks a lot LeeDr for this clear explanation !

Have a nice day,
Alex

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