# Terms aggregation for emails list

**URL:** <https://discuss.elastic.co/t/terms-aggregation-for-emails-list/204222>\
**Category:** Elasticsearch\
**Created:** [October 18, 2019, 12:14pm UTC](https://discuss.elastic.co/t/terms-aggregation-for-emails-list/204222 "2019-10-18T12:14:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pkast](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkast/32/55818_2.png) [@pkast](https://discuss.elastic.co/u/pkast)\
**Post date:** [October 18, 2019, 12:40pm UTC](https://discuss.elastic.co/t/terms-aggregation-for-emails-list/204222/2 "2019-10-18T12:40:20Z")

</div>

Hi,

maybe this helps here as well:

> [@Aggregations and special characters](https://discuss.elastic.co/t/aggregations-and-special-characters/18559):
>
> I am performing an terms aggregation on a query to return the unique values of a field, in this case the field being emails in the format [example@gmail.com](mailto:example@gmail.com) or [example@aaa.example.com](mailto:example@aaa.example.com). "aggregations": { "users\_overall": { "terms": { "field": "email" } } } Instead of receiving back the full unique emails that I need I get results such as these: { key: [gmail.com](http://gmail.com) doc\_count: 121864 } { key: [yahoo.com](http://yahoo.com) doc\_count: 68648 } { key: [roadrunner.com](http://roadrunner.com) doc\_count: 58194 } { key: [opti…](http://optimum.net)

---

_[View the full topic](https://discuss.elastic.co/t/terms-aggregation-for-emails-list/204222)._
