# Aggregate on analyzed field

**URL:** <https://discuss.elastic.co/t/aggregate-on-analyzed-field/19447>\
**Category:** Elasticsearch\
**Created:** [August 25, 2014, 7:49pm UTC](https://discuss.elastic.co/t/aggregate-on-analyzed-field/19447 "2014-08-25T19:49:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kti\_sk](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kti\_sk](https://discuss.elastic.co/u/kti_sk)\
**Post date:** [August 25, 2014, 7:49pm UTC](https://discuss.elastic.co/t/aggregate-on-analyzed-field/19447/1 "2014-08-25T19:49:41Z")

</div>

I am aggregating documents by customer name to find how many documents we  
have per customer.  
The aggregates bucketize words in names. For example, if I have customer,  
Tom Cruise, I would get 2 buckets, "Tom" and "Cruise"

How would I treat the analyzed field as not\_analyzed in aggregate query?  
I still want the field to remain analyzed so that I can do fulltext search.

thanks

--  
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/ff43bdfa-db39-4894-8cf8-a1f6b0df96ce%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ff43bdfa-db39-4894-8cf8-a1f6b0df96ce%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 26, 2014, 8:06am UTC](https://discuss.elastic.co/t/aggregate-on-analyzed-field/19447/2 "2014-08-26T08:06:47Z")

</div>

Hi,

Multi-fields are usually the way to go in such cases, see

> **[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 25, 2014 at 9:49 PM, [kti\_sk@hotmail.com](mailto:kti_sk@hotmail.com) wrote:

> I am aggregating documents by customer name to find how many documents we  
> have per customer.  
> The aggregates bucketize words in names. For example, if I have customer,  
> Tom Cruise, I would get 2 buckets, "Tom" and "Cruise"
> 
> How would I treat the analyzed field as not\_analyzed in aggregate query?  
> I still want the field to remain analyzed so that I can do fulltext search.
> 
> thanks
> 
> --  
> 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/ff43bdfa-db39-4894-8cf8-a1f6b0df96ce%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ff43bdfa-db39-4894-8cf8-a1f6b0df96ce%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/ff43bdfa-db39-4894-8cf8-a1f6b0df96ce%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ff43bdfa-db39-4894-8cf8-a1f6b0df96ce%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/CAL6Z4j5R69zwcKpYGr60WD\_yQrwGcnfaRnfJusHUvmLimg2XnQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5R69zwcKpYGr60WD_yQrwGcnfaRnfJusHUvmLimg2XnQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:06am UTC](https://discuss.elastic.co/t/aggregate-on-analyzed-field/19447/3 "2017-07-06T01:06:33Z")

</div>


