# Multi-select faceting

**URL:** https://discuss.elastic.co/t/multi-select-faceting/6328
**Category:** Elasticsearch
**Created:** [January 9, 2012, 4:08pm UTC](https://discuss.elastic.co/t/multi-select-faceting/6328 "2012-01-09T16:08:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Wojciech\_Durczynski](https://avatars.discourse-cdn.com/v4/letter/w/fbc32d/32.png) [@Wojciech\_Durczynski](https://discuss.elastic.co/u/Wojciech_Durczynski)
#### Post date: [January 9, 2012, 4:08pm UTC](https://discuss.elastic.co/t/multi-select-faceting/6328/1 "2012-01-09T16:08:15Z")

</div>

Hello

I'd like to use multi-select faceting in Elastic Search.  
This feature is described on Lucene's Jira:  
[https://issues.apache.org/jira/browse/LUCENE-3079](https://issues.apache.org/jira/browse/LUCENE-3079)

I mean following part:

> - evaluation of facet values that would dismiss due to other facet filters  
> (Yonik says Solr calls this "multi-select faceting").(realized by  
> FacetSearcher.fillFacetsForGuiMode())
> 
> Let me explain the last point: For the user a facet query  
> (color==green) AND (shape==circle OR shape==square)  
> may look like  
> Facet color  
> (3) red  
> (5) green  
> (7) blue  
> Facet shape  
> (9) circle  
> (4) line  
> (2) square  
> The red/blue/line facet values will display even though the  
> corresponding documents are not in the result set. Also there is  
> support for filtered facet values with zero results, so users  
> understand why they do not get results.

I'm sure that this feature would be very useful.  
There is a workaround now - prepare facet requests with complex facet  
filters, but it's so difficult sometimes and very ineffective.  
Is there a possibility that ES would contain an out-of-the-box solution for  
this use case?  
I think that the greatest difficulty will be to match facet requests in  
query and facet selections (provided probably as filters). Maybe there  
should also be a way to convert selected facets into filters to next query  
easily?

Regards  
Wojciech Durczyński

---

<div class="post-metadata">

### Author: ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)
#### Post date: [January 10, 2012, 9:50am UTC](https://discuss.elastic.co/t/multi-select-faceting/6328/2 "2012-01-10T09:50:50Z")

</div>

It is already possible with ES (not sure if you mean that with  
'workaround'), but yes, for this specific use case it can go probably  
easier. Here is my discussion with Shay:

> <https://github.com/elastic/elasticsearch/issues/499>

Feel free to comment there 🙂

Peter.

---

<div class="post-metadata">

### Author: ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)
#### Post date: [January 10, 2012, 9:51am UTC](https://discuss.elastic.co/t/multi-select-faceting/6328/3 "2012-01-10T09:51:46Z")

</div>

> I think that the greatest difficulty will be to match facet requests in  
> query and facet selections (provided probably as filters). Maybe there  
> should also be a way to convert selected facets into filters to next query  
> easily?

Why do you think its complicated as facets can have a name?

---

<div class="post-metadata">

### Author: ![Wojciech\_Durczynski](https://avatars.discourse-cdn.com/v4/letter/w/fbc32d/32.png) [@Wojciech\_Durczynski](https://discuss.elastic.co/u/Wojciech_Durczynski)
#### Post date: [January 11, 2012, 3:12pm UTC](https://discuss.elastic.co/t/multi-select-faceting/6328/4 "2012-01-11T15:12:51Z")

</div>

With search filter described here:

> <https://github.com/elastic/elasticsearch/issues/650>

  
this feature is easy to implement.  
Thank you.

---

<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:43am UTC](https://discuss.elastic.co/t/multi-select-faceting/6328/5 "2017-07-06T03:43:07Z")

</div>


