# About Aggregations

**URL:** <https://discuss.elastic.co/t/about-aggregations/93249>\
**Category:** Elasticsearch\
**Created:** [July 15, 2017, 1:45am UTC](https://discuss.elastic.co/t/about-aggregations/93249 "2017-07-15T01:45:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schakrovorthy](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@schakrovorthy](https://discuss.elastic.co/u/schakrovorthy)\
**Post date:** [July 15, 2017, 1:45am UTC](https://discuss.elastic.co/t/about-aggregations/93249/1 "2017-07-15T01:45:12Z")

</div>

Can elastic search return the entire root document from a top hits sub-aggregation within a nested aggregation? It seems that the scope of the \_source field within a top hits aggregation is restricted to the scope of the nested document when used within a nested aggregation and hence only returns the nested document.

---

<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:** [August 12, 2017, 1:45am UTC](https://discuss.elastic.co/t/about-aggregations/93249/2 "2017-08-12T01:45:47Z")

</div>

Closed on August 12, 2017, 1:45am UTC

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