You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by David Giffin <da...@giffin.org> on 2009/10/27 18:20:26 UTC

facet.query and fq

Hi There,

Is there a way to get facet.query= to ignore the fq= param? We want to
do a query like this:

select?fl=*&start=0&q=cool&fq=in_stock:true&facet=true&facet.query=in_stock:false&qt=dismax

To understand the count of items not in stock, when someone has
filtered items that are in stock. Or is there a way to combine two
queries into one?

Thanks,
David

Re: facet.query and fq

Posted by David Giffin <da...@giffin.org>.
Thanks, that was just what I was looking for!

On Tue, Oct 27, 2009 at 1:27 PM, Jérôme Etévé <je...@gmail.com> wrote:
> Hi,
>
>  you need to 'tag' your filter and then exclude it from the faceting.
>
>  An example here:
> http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters
>
> J.
>
> 2009/10/27 David Giffin <da...@giffin.org>:
>> Hi There,
>>
>> Is there a way to get facet.query= to ignore the fq= param? We want to
>> do a query like this:
>>
>> select?fl=*&start=0&q=cool&fq=in_stock:true&facet=true&facet.query=in_stock:false&qt=dismax
>>
>> To understand the count of items not in stock, when someone has
>> filtered items that are in stock. Or is there a way to combine two
>> queries into one?
>>
>> Thanks,
>> David
>>
>
>
>
> --
> Jerome Eteve.
> http://www.eteve.net
> jerome@eteve.net
>

Re: facet.query and fq

Posted by Jérôme Etévé <je...@gmail.com>.
Hi,

 you need to 'tag' your filter and then exclude it from the faceting.

 An example here:
http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters

J.

2009/10/27 David Giffin <da...@giffin.org>:
> Hi There,
>
> Is there a way to get facet.query= to ignore the fq= param? We want to
> do a query like this:
>
> select?fl=*&start=0&q=cool&fq=in_stock:true&facet=true&facet.query=in_stock:false&qt=dismax
>
> To understand the count of items not in stock, when someone has
> filtered items that are in stock. Or is there a way to combine two
> queries into one?
>
> Thanks,
> David
>



-- 
Jerome Eteve.
http://www.eteve.net
jerome@eteve.net