# Group least frequent terms using a terms facet

**URL:** <https://discuss.elastic.co/t/group-least-frequent-terms-using-a-terms-facet/8383>\
**Category:** Elasticsearch\
**Created:** [July 11, 2012, 2:13pm UTC](https://discuss.elastic.co/t/group-least-frequent-terms-using-a-terms-facet/8383 "2012-07-11T14:13:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Duarte\_Figuei](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Daniel\_Duarte\_Figuei](https://discuss.elastic.co/u/Daniel_Duarte_Figuei)\
**Post date:** [July 11, 2012, 2:13pm UTC](https://discuss.elastic.co/t/group-least-frequent-terms-using-a-terms-facet/8383/1 "2012-07-11T14:13:57Z")

</div>

Hello,  
Imagine I am indexing posts that have tags, and I want to show the most  
frequent tags using a terms facet. I don't want to display the number of  
posts of all tags, I want something like:  
Tag1: 10%  
Tag2: 9%  
Tag3: 7%  
Tag4: 5%  
Others: 69%

Is there an easy way of grouping the least frequent terms in a terms facet  
search?

I am thinking about displaying the results using Protovis/D3.js charts, as  
explained here[http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html](http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html)  
.

---

<div class="post-metadata">

**Author:** ![Vinicius\_Melo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_melo/32/2720_2.png) [@Vinicius\_Melo](https://discuss.elastic.co/u/Vinicius_Melo)\
**Post date:** [July 15, 2012, 11:41pm UTC](https://discuss.elastic.co/t/group-least-frequent-terms-using-a-terms-facet/8383/2 "2012-07-15T23:41:54Z")

</div>

I don't think it's possible

On Wednesday, July 11, 2012 11:13:57 AM UTC-3, Daniel Duarte Figueiredo  
wrote:

> Hello,  
> Imagine I am indexing posts that have tags, and I want to show the most  
> frequent tags using a terms facet. I don't want to display the number of  
> posts of all tags, I want something like:  
> Tag1: 10%  
> Tag2: 9%  
> Tag3: 7%  
> Tag4: 5%  
> Others: 69%
> 
> Is there an easy way of grouping the least frequent terms in a terms facet  
> search?
> 
> I am thinking about displaying the results using Protovis/D3.js charts, as  
> explained here[http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html](http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html)  
> .

---

<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, 3:20am UTC](https://discuss.elastic.co/t/group-least-frequent-terms-using-a-terms-facet/8383/3 "2017-07-06T03:20:15Z")

</div>

Closed on July 6, 2017, 3:20am UTC


