# TermsFacet - Separate Facets by Referance to the Indexfield?

**URL:** <https://discuss.elastic.co/t/termsfacet-separate-facets-by-referance-to-the-indexfield/13028>\
**Category:** Elasticsearch\
**Created:** [August 1, 2013, 9:15am UTC](https://discuss.elastic.co/t/termsfacet-separate-facets-by-referance-to-the-indexfield/13028 "2013-08-01T09:15:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ES\_User](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@ES\_User](https://discuss.elastic.co/u/ES_User)\
**Post date:** [August 1, 2013, 9:15am UTC](https://discuss.elastic.co/t/termsfacet-separate-facets-by-referance-to-the-indexfield/13028/1 "2013-08-01T09:15:45Z")

</div>

Hi!

I would like to use the termsFacet for a search over two indexfields: User  
and Category for example.

The facets should be separated displayed in reference to the indexfields.  
Is that possible or have i  
to add 2 facets to the searchrequest?

Thanks!

--  
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:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [August 5, 2013, 1:26pm UTC](https://discuss.elastic.co/t/termsfacet-separate-facets-by-referance-to-the-indexfield/13028/2 "2013-08-05T13:26:52Z")

</div>

Hi Sandra,  
you can make a facet on multiple fields, but then all the values coming  
from those multiple fields would be merged into a single facet, thus it's  
not possible to display them separately, if that's what you were asking.

I think in your case two different facets should work fine.

Cheers  
Luca

On Thursday, August 1, 2013 11:15:45 AM UTC+2, Sandra wrote:

> Hi!
> 
> I would like to use the termsFacet for a search over two indexfields: User  
> and Category for example.
> 
> The facets should be separated displayed in reference to the indexfields.  
> Is that possible or have i  
> to add 2 facets to the searchrequest?
> 
> Thanks!

--  
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:22am UTC](https://discuss.elastic.co/t/termsfacet-separate-facets-by-referance-to-the-indexfield/13028/3 "2017-07-06T02:22:55Z")

</div>

Closed on July 6, 2017, 2:22am UTC


