A top_hits metric aggregator keeps track of the most relevant document being aggregated. This aggregator is intended to be used as a sub aggregator, so that the top matching documents can be aggregated per bucket. We do not recommend using top_hits as a top-level aggregation. If you want to group search hits, use the collapse parameter instead. The top_hits aggregator can effectively be used to gr
![Top hits aggregation | Elasticsearch Guide [8.11] | Elastic](https://cdn-ak-scissors.b.st-hatena.com/image/square/cbbc87b803e58787f8346841e5b65698d408f3c5/height=288;version=1;width=512/https%3A%2F%2Fwww.elastic.co%2Fstatic%2Fimages%2Felastic-logo-200.png)