I'm trying to create some simple Data Table visualizations in Kibana 7.4.2, essentially mimicking the results of a Saved Search in Discover, with of course the added ability to download a CSV export.
Assume my index is a collection of documents describing Books.
After Splitting Rows with a Terms Aggregation on the "bookId" field, I want to add the "title" as a column.
Is it better to do this as a sub-bucket, further splitting rows with a Term Aggregation on the "title" field (as described here - https://subscription.packtpub.com/book/big_data_and_business_intelligence/9781788831031/4/ch04lvl1sec26/data-tables), or as a Metric, with a Top Hit Aggregation on the "title" field (as described here - Adding Columns in Data Table)?
Are there any advantages - performance or otherwise - to one approach over the other?
What if my index potentially has duplicate documents for each book (due to denormalization), but I'm still certain that each copy has the same "title"?
Thanks,
Reuven