# Is it possible to have "type wide" term facets with \[all\_terms: true\]?

**URL:** https://discuss.elastic.co/t/is-it-possible-to-have-type-wide-term-facets-with-all-terms-true/11999
**Category:** Elasticsearch
**Created:** [May 16, 2013, 11:41pm UTC](https://discuss.elastic.co/t/is-it-possible-to-have-type-wide-term-facets-with-all-terms-true/11999 "2013-05-16T23:41:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vladimir\_Kartaviy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladimir_kartaviy/32/2333_2.png) [@Vladimir\_Kartaviy](https://discuss.elastic.co/u/Vladimir_Kartaviy)
#### Post date: [May 16, 2013, 11:41pm UTC](https://discuss.elastic.co/t/is-it-possible-to-have-type-wide-term-facets-with-all-terms-true/11999/1 "2013-05-16T23:41:28Z")

</div>

Hi folks.

Is it possible to have "type wide" term facets with [all\_terms: true] ?  
Because now if I have 2 types of the same index and trying to get facets on  
common field elasticsearch returns me index wide terms but I need type  
wide. That's happens when the facet term field name intersects in types ☹

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)
#### Post date: [May 17, 2013, 10:53am UTC](https://discuss.elastic.co/t/is-it-possible-to-have-type-wide-term-facets-with-all-terms-true/11999/2 "2013-05-17T10:53:39Z")

</div>

Yes it is possible. Facets are calculated on your query results, so you  
could just limit your query to a particular type, across multiple indices.  
Also, you can further limit a facet using a facet filter.

Perhaps gist what you're doing

--  
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).  
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, 2:36am UTC](https://discuss.elastic.co/t/is-it-possible-to-have-type-wide-term-facets-with-all-terms-true/11999/3 "2017-07-06T02:36:08Z")

</div>


