I'm drawing a blank on how to accomplish this in Kibana or Elastic.
Prefer to have this in a Lens visual so I can add to a dashboard, but minimally I can do it with an aggregate API query in Kibana dev tools.
I'm dumbing down my documents to something super simple for the example.
Ooooh - ES|QL - good point. I forgot about that and haven't used it yet. Will try. Thank you.
Yes that's correct. I would like the parentID and the COUNT of records for that value (in this case 3).
When you extend this across a large data set (and lots more data in each document) I'm still just wanting the parentID values that have more than 2 documents.
Just posting the solution to this in case anyone else needs it.
The ES|QL suggestion was great - thank you @stephenb.
from docs
| stats numResults = COUNT(*) by parentID
I kind of hacked my way through a Lens visual for this. Only shows the last bunch of results so it's not a complete solution. I may be missing some other visual that would show it better.
vertical bar stacked
horizontal axis: parentID
number values: big enough to show all the groups (my real data has 500+ of these)
rank ascending
group remaining as other is OFF
vertical axis: count
breakdown by: parentID
Some drawbacks of this visual:
only shows highest or lowest N groups depending on rank direction
have to guess at the number of groups to show, so might not see all the results
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.