# Unique Count in aggregations

**URL:** <https://discuss.elastic.co/t/unique-count-in-aggregations/15137>\
**Category:** Elasticsearch\
**Created:** [January 8, 2014, 9:11am UTC](https://discuss.elastic.co/t/unique-count-in-aggregations/15137 "2014-01-08T09:11:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstantinos\_Zachara](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/konstantinos_zachara/32/1887_2.png) [@Konstantinos\_Zachara](https://discuss.elastic.co/u/Konstantinos_Zachara)\
**Post date:** [January 8, 2014, 9:11am UTC](https://discuss.elastic.co/t/unique-count-in-aggregations/15137/1 "2014-01-08T09:11:09Z")

</div>

Hello,

I would like to ask about the support of unique terms in aggregations.  
Shay had mentioned in the issue #1044[https://github.com/elasticsearch/elasticsearch/issues/1044](https://github.com/elasticsearch/elasticsearch/issues/1044) that  
once the aggregation framework is done you plan to add this new feature?  
Since aggregations are here since Beta2, how close in your roadmap is the  
unique terms support? Should we expect that in 1.0.0 Release?

Kind Regards  
Kostas

--  
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/24ca975a-55f4-41ee-8d65-b9e65642eb74%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/24ca975a-55f4-41ee-8d65-b9e65642eb74%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![vaidik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaidik/32/1134_2.png) [@vaidik](https://discuss.elastic.co/u/vaidik)\
**Post date:** [January 8, 2014, 9:15am UTC](https://discuss.elastic.co/t/unique-count-in-aggregations/15137/2 "2014-01-08T09:15:22Z")

</div>

Haven't tried the aggregations module. But if what you want are unique  
terms, I think you can do that using Term Facets as well. Also, in case you  
use Terms Facet, you will have to select such a size that will ensure that  
ES returns all the terms and does not discard some when size is lesser than  
the number of unique terms.

Vaidik Kapoor  
vaidikkapoor.info

On 8 January 2014 14:41, Konstantinos Zacharakis [kzachara@gmail.com](mailto:kzachara@gmail.com) wrote:

> Hello,
> 
> I would like to ask about the support of unique terms in aggregations.  
> Shay had mentioned in the issue #1044[https://github.com/elasticsearch/elasticsearch/issues/1044](https://github.com/elasticsearch/elasticsearch/issues/1044) that  
> once the aggregation framework is done you plan to add this new feature?  
> Since aggregations are here since Beta2, how close in your roadmap is the  
> unique terms support? Should we expect that in 1.0.0 Release?
> 
> Kind Regards  
> Kostas
> 
> --  
> 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/24ca975a-55f4-41ee-8d65-b9e65642eb74%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/24ca975a-55f4-41ee-8d65-b9e65642eb74%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CACWtv5neMVd4Cgm9g9W3ePvNXg%3DhRHrzoE5mj\_QaT8CTEXVByw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACWtv5neMVd4Cgm9g9W3ePvNXg%3DhRHrzoE5mj_QaT8CTEXVByw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Konstantinos\_Zachara](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/konstantinos_zachara/32/1887_2.png) [@Konstantinos\_Zachara](https://discuss.elastic.co/u/Konstantinos_Zachara)\
**Post date:** [January 8, 2014, 10:06am UTC](https://discuss.elastic.co/t/unique-count-in-aggregations/15137/3 "2014-01-08T10:06:01Z")

</div>

Hi Vaidik,

This method is fine when the term cardinality is low and can be also  
achieved using the aggregations framework.  
However when cardinality is high, the memory footprint will be also high  
and for sure not so safe.

On Wednesday, 8 January 2014 11:15:22 UTC+2, Vaidik Kapoor wrote:

> Haven't tried the aggregations module. But if what you want are unique  
> terms, I think you can do that using Term Facets as well. Also, in case you  
> use Terms Facet, you will have to select such a size that will ensure that  
> ES returns all the terms and does not discard some when size is lesser than  
> the number of unique terms.
> 
> Vaidik Kapoor  
> vaidikkapoor.info
> 
> On 8 January 2014 14:41, Konstantinos Zacharakis \<[kzac...@gmail.com](mailto:kzac...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hello,
> > 
> > I would like to ask about the support of unique terms in aggregations.  
> > Shay had mentioned in the issue #1044[https://github.com/elasticsearch/elasticsearch/issues/1044](https://github.com/elasticsearch/elasticsearch/issues/1044) that  
> > once the aggregation framework is done you plan to add this new feature?  
> > Since aggregations are here since Beta2, how close in your roadmap is the  
> > unique terms support? Should we expect that in 1.0.0 Release?
> > 
> > Kind Regards  
> > Kostas
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/24ca975a-55f4-41ee-8d65-b9e65642eb74%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/24ca975a-55f4-41ee-8d65-b9e65642eb74%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/3802839d-ac98-4557-abf9-9509280f9c57%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3802839d-ac98-4557-abf9-9509280f9c57%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:57am UTC](https://discuss.elastic.co/t/unique-count-in-aggregations/15137/4 "2017-07-06T01:57:57Z")

</div>


