# Replicating TermsFacet functionality with aggregations

**URL:** <https://discuss.elastic.co/t/replicating-termsfacet-functionality-with-aggregations/15761>\
**Category:** Elasticsearch\
**Created:** [February 12, 2014, 5:38pm UTC](https://discuss.elastic.co/t/replicating-termsfacet-functionality-with-aggregations/15761 "2014-02-12T17:38:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Hudson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_hudson/32/1306_2.png) [@Brian\_Hudson](https://discuss.elastic.co/u/Brian_Hudson)\
**Post date:** [February 12, 2014, 5:38pm UTC](https://discuss.elastic.co/t/replicating-termsfacet-functionality-with-aggregations/15761/1 "2014-02-12T17:38:17Z")

</div>

Loving aggregations so far, great work guys.

I'm trying to convert some code I have which uses TermsFacet to use  
aggregations instead, however I am not sure how to replicate the  
TermFacet.getOtherCount() functionality.To replicate  
TermsFacet.getMissingCount() I am simply adding a "missing" aggregation,  
but I don't see any aggregation equivalent for other count.

Does anyone have any suggestions on how to replicate this functionality  
using aggregations?

Brian

--  
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/4931eb6f-5b30-4baf-aa42-4092ea4e6156%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4931eb6f-5b30-4baf-aa42-4092ea4e6156%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:** ![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:** [February 13, 2014, 11:31pm UTC](https://discuss.elastic.co/t/replicating-termsfacet-functionality-with-aggregations/15761/2 "2014-02-13T23:31:34Z")

</div>

Indeed, I don't think this is possible with aggregations right now. Can you  
open an issue on Github?

On Wed, Feb 12, 2014 at 6:38 PM, Brian Hudson [brian.r.hudson@gmail.com](mailto:brian.r.hudson@gmail.com)wrote:

> Loving aggregations so far, great work guys.
> 
> I'm trying to convert some code I have which uses TermsFacet to use  
> aggregations instead, however I am not sure how to replicate the  
> TermFacet.getOtherCount() functionality.To replicate  
> TermsFacet.getMissingCount() I am simply adding a "missing" aggregation,  
> but I don't see any aggregation equivalent for other count.
> 
> Does anyone have any suggestions on how to replicate this functionality  
> using aggregations?
> 
> Brian
> 
> --  
> 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/4931eb6f-5b30-4baf-aa42-4092ea4e6156%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4931eb6f-5b30-4baf-aa42-4092ea4e6156%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAL6Z4j6WRm-0Am2CisuJH-k%3DS3JnFsZvz7Ps1R%2Bq543wVho\_TA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6WRm-0Am2CisuJH-k%3DS3JnFsZvz7Ps1R%2Bq543wVho_TA%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:** ![Eric\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_jain/32/834_2.png) [@Eric\_Jain](https://discuss.elastic.co/u/Eric_Jain)\
**Post date:** [August 9, 2014, 1:26am UTC](https://discuss.elastic.co/t/replicating-termsfacet-functionality-with-aggregations/15761/3 "2014-08-09T01:26:47Z")

</div>

> <https://github.com/elastic/elasticsearch/issues/7213>
>
> There does not appear to be a way to replicate this feature with the current agg…regation API.

On Thursday, February 13, 2014 3:31:34 PM UTC-8, Adrien Grand wrote:

> Indeed, I don't think this is possible with aggregations right now. Can  
> you open an issue on Github?
> 
> On Wed, Feb 12, 2014 at 6:38 PM, Brian Hudson \<[brian.r...@gmail.com](mailto:brian.r...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Loving aggregations so far, great work guys.
> > 
> > I'm trying to convert some code I have which uses TermsFacet to use  
> > aggregations instead, however I am not sure how to replicate the  
> > TermFacet.getOtherCount() functionality.To replicate  
> > TermsFacet.getMissingCount() I am simply adding a "missing" aggregation,  
> > but I don't see any aggregation equivalent for other count.
> > 
> > Does anyone have any suggestions on how to replicate this functionality  
> > using aggregations?
> > 
> > Brian
> > 
> > --  
> > 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/4931eb6f-5b30-4baf-aa42-4092ea4e6156%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4931eb6f-5b30-4baf-aa42-4092ea4e6156%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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/b48fb844-ab5b-4005-875d-2f84e9bae77f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b48fb844-ab5b-4005-875d-2f84e9bae77f%40googlegroups.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:09am UTC](https://discuss.elastic.co/t/replicating-termsfacet-functionality-with-aggregations/15761/4 "2017-07-06T01:09:53Z")

</div>


