# Best way to aggregate terms from a text field with type text

**URL:** <https://discuss.elastic.co/t/best-way-to-aggregate-terms-from-a-text-field-with-type-text/273864>\
**Category:** Elasticsearch\
**Created:** [May 24, 2021, 8:09pm UTC](https://discuss.elastic.co/t/best-way-to-aggregate-terms-from-a-text-field-with-type-text/273864 "2021-05-24T20:09:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedraketaylor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thedraketaylor/32/52283_2.png) [@thedraketaylor](https://discuss.elastic.co/u/thedraketaylor)\
**Post date:** [May 24, 2021, 8:09pm UTC](https://discuss.elastic.co/t/best-way-to-aggregate-terms-from-a-text-field-with-type-text/273864/1 "2021-05-24T20:09:28Z")

</div>

I'm using Elasticsearch to hold descriptions of products I get from scraping sites. I have a description field in my index to hold the data and it's of type "text" because I want to search in those fields. Now, I find myself wanting to use aggs on that field as well but I have a large dataset so using fielddata isn't an option. Basically I want to search for "refrigerator" and get back an aggregation of how many descriptions have "freezer". That's a contrived example, but it works for what I want. What is the best way to do this?

Thanks!

---

<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:** [June 21, 2021, 8:09pm UTC](https://discuss.elastic.co/t/best-way-to-aggregate-terms-from-a-text-field-with-type-text/273864/2 "2021-06-21T20:09:51Z")

</div>

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