# Top hits does not work with significant text aggregation

**URL:** <https://discuss.elastic.co/t/top-hits-does-not-work-with-significant-text-aggregation/270188>\
**Category:** Elasticsearch\
**Created:** [April 15, 2021, 6:27am UTC](https://discuss.elastic.co/t/top-hits-does-not-work-with-significant-text-aggregation/270188 "2021-04-15T06:27:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sj12345](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sj12345/32/86546_2.png) [@sj12345](https://discuss.elastic.co/u/sj12345)\
**Post date:** [April 15, 2021, 6:27am UTC](https://discuss.elastic.co/t/top-hits-does-not-work-with-significant-text-aggregation/270188/1 "2021-04-15T06:27:05Z")

</div>

Is there any workaround for getting the original documents based on the buckets for a significant text aggregation ?

The solution outlined here does not work for "significant text"  
[How to get documents from the buckets in terms aggregation?](https://discuss.elastic.co/t/how-to-get-documents-from-the-buckets-in-terms-aggregation/29239)

since child aggregations not supported for significant text

> **[Significant text aggregation | Elasticsearch Guide \[master\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-bucket-significanttext-aggregation.html#_no_support_for_child_aggregations)**

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [April 15, 2021, 7:33am UTC](https://discuss.elastic.co/t/top-hits-does-not-work-with-significant-text-aggregation/270188/2 "2021-04-15T07:33:20Z")

</div>

> [@sj12345](#):
>
> Is there any workaround for getting the original documents based on the buckets for a significant text aggregation ?

Simply use the discovered terms as search terms in a second query.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 13, 2021, 7:33am UTC](https://discuss.elastic.co/t/top-hits-does-not-work-with-significant-text-aggregation/270188/3 "2021-05-13T07:33:57Z")

</div>

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