# Aggregates - include source data

**URL:** <https://discuss.elastic.co/t/aggregates-include-source-data/19327>\
**Category:** Elasticsearch\
**Created:** [August 18, 2014, 3:34pm UTC](https://discuss.elastic.co/t/aggregates-include-source-data/19327 "2014-08-18T15:34:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [August 18, 2014, 3:34pm UTC](https://discuss.elastic.co/t/aggregates-include-source-data/19327/1 "2014-08-18T15:34:38Z")

</div>

Hi,

From looking at the docs, didn't seem overly clear. Is it possible to  
include the data in an aggregate, or is it counts only?

John

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/83032bdc-53f4-4728-b109-e9ab3eb3d412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83032bdc-53f4-4728-b109-e9ab3eb3d412%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [August 18, 2014, 3:46pm UTC](https://discuss.elastic.co/t/aggregates-include-source-data/19327/2 "2014-08-18T15:46:33Z")

</div>

Aggregations only report counts or various metrics (see the metrics  
aggregations: stats, min, max, sum, percentiles, cardinality, top\_hits,  
...). Maybe top\_hits is what you are looking for?

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Mon, Aug 18, 2014 at 5:34 PM, John D. Ament [john.d.ament@gmail.com](mailto:john.d.ament@gmail.com)  
wrote:

> Hi,
> 
> From looking at the docs, didn't seem overly clear. Is it possible to  
> include the data in an aggregate, or is it counts only?
> 
> John
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/83032bdc-53f4-4728-b109-e9ab3eb3d412%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83032bdc-53f4-4728-b109-e9ab3eb3d412%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/83032bdc-53f4-4728-b109-e9ab3eb3d412%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/83032bdc-53f4-4728-b109-e9ab3eb3d412%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7Kct0y6LfDFENvvfgnN7N04vOpp35zRpg%3DG4AHw94Jhg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7Kct0y6LfDFENvvfgnN7N04vOpp35zRpg%3DG4AHw94Jhg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![lessless](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lessless](https://discuss.elastic.co/u/lessless)\
**Post date:** [September 13, 2016, 1:11pm UTC](https://discuss.elastic.co/t/aggregates-include-source-data/19327/3 "2016-09-13T13:11:08Z")

</div>

> [@jpountz](#):
>
> Aggregations only report counts or various metrics (see the metrics  
> aggregations: stats, min, max, sum, percentiles, cardinality, top\_hits,  
> ...). Maybe top\_hits is what you are looking for?

Does this condition still apply? Any chances to overcome a need of hard-coding `size` argument?

---

<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:** [July 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/aggregates-include-source-data/19327/4 "2017-07-05T22:20:43Z")

</div>


