# Facets ignore a filter

**URL:** <https://discuss.elastic.co/t/facets-ignore-a-filter/8812>\
**Category:** Elasticsearch\
**Created:** [August 22, 2012, 10:43am UTC](https://discuss.elastic.co/t/facets-ignore-a-filter/8812 "2012-08-22T10:43:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roch\_Delsalle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roch_delsalle/32/2757_2.png) [@Roch\_Delsalle](https://discuss.elastic.co/u/Roch_Delsalle)\
**Post date:** [August 22, 2012, 10:43am UTC](https://discuss.elastic.co/t/facets-ignore-a-filter/8812/1 "2012-08-22T10:43:13Z")

</div>

Hi,

I have an issue with facets and I would like to know if I can achieve the  
following thing :  
I want to ignore one of my filters : the reason why I want to do that is  
because I only have this filter on the first page of my search engine, it  
hides some of options available.

Is it possible to do that without sending two requests ?

Thanks,

Roch

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 22, 2012, 11:19am UTC](https://discuss.elastic.co/t/facets-ignore-a-filter/8812/2 "2012-08-22T11:19:02Z")

</div>

You can send a query with one filtered facet and with the same facet without filter.

Use two different facet name.

HTH  
David

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 22 août 2012 à 12:43, Roch Delsalle [rdelsalle@gmail.com](mailto:rdelsalle@gmail.com) a écrit :

> Hi,
> 
> I have an issue with facets and I would like to know if I can achieve the following thing :  
> I want to ignore one of my filters : the reason why I want to do that is because I only have this filter on the first page of my search engine, it hides some of options available.
> 
> Is it possible to do that without sending two requests ?
> 
> Thanks,
> 
> ## Roch

--

---

<div class="post-metadata">

**Author:** ![phill](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@phill](https://discuss.elastic.co/u/phill)\
**Post date:** [August 29, 2012, 5:45pm UTC](https://discuss.elastic.co/t/facets-ignore-a-filter/8812/3 "2012-08-29T17:45:41Z")

</div>

I think your problem is unclearly stated, because I can't tell if "one  
of my filters" is within a filtered query, a filter on a query request  
(to filter the hits, but not the filters), or a filter somewhere in the  
facets themselves (David P. suggested this last one as a solution).

But knowing that you are on the 1st page is certainly a UI or  
middle-tier bit of information, so I think I would have the application  
ask a slightly different question thus triggering a slightly different  
ES search request.

Also, did you mean "sending two" different "requests", one special  
variant for page 1 and a different 1 for other pages, as I have stated  
above, or are you thinking of a solution where to complete page 2 or  
higher you send 2 requests?

You can ask for 2 or more facets in one search request and just _use_  
one or other depending on whatever page your on. But then if you know  
the page when your receiving, you'd know the page when your sending, so  
why ask for both if you only need one or the other?

-Paul

On 8/22/2012 3:43 AM, Roch Delsalle wrote:

> Hi,
> 
> I have an issue with facets and I would like to know if I can achieve  
> the following thing :  
> I want to ignore one of my filters : the reason why I want to do that  
> is because I only have this filter on the first page of my search  
> engine, it hides some of options available.
> 
> Is it possible to do that without sending two requests ?
> 
> Thanks,
> 
> ## Roch

--

---

<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:14am UTC](https://discuss.elastic.co/t/facets-ignore-a-filter/8812/4 "2017-07-06T03:14:43Z")

</div>

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


