# Term Count API?

**URL:** <https://discuss.elastic.co/t/term-count-api/3813>\
**Category:** Elasticsearch\
**Created:** [January 20, 2011, 1:12am UTC](https://discuss.elastic.co/t/term-count-api/3813 "2011-01-20T01:12:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_smith/32/1323_2.png) [@Paul\_Smith](https://discuss.elastic.co/u/Paul_Smith)\
**Post date:** [January 20, 2011, 1:12am UTC](https://discuss.elastic.co/t/term-count-api/3813/1 "2011-01-20T01:12:21Z")

</div>

One has the term facet, but that can take a long time on a field that has a  
lot of distinct values (and fair enough too). In a case of a tool that is  
'auto-discovering' fields of an index, it would be nice to check the #  
distinct terms in a given field, so that ignoring the term facet for that  
field can be done.

there isn't an API for that as far as I can tell. ?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 20, 2011, 4:12pm UTC](https://discuss.elastic.co/t/term-count-api/3813/2 "2011-01-20T16:12:49Z")

</div>

There isn't one. There used to be, but I was not happy with. I plan to try and tackle the term API later (not this version) and make it more usable.  
On Thursday, January 20, 2011 at 3:12 AM, Paul Smith wrote:

> One has the term facet, but that can take a long time on a field that has a lot of distinct values (and fair enough too). In a case of a tool that is 'auto-discovering' fields of an index, it would be nice to check the # distinct terms in a given field, so that ignoring the term facet for that field can be done.
> 
> there isn't an API for that as far as I can tell. ?

---

<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, 4:13am UTC](https://discuss.elastic.co/t/term-count-api/3813/3 "2017-07-06T04:13:26Z")

</div>

Closed on July 6, 2017, 4:13am UTC


