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 Vijay Kokatnur <ko...@gmail.com> on 2014/03/10 21:51:26 UTC

Multiple "fq" parameters are not executed

<..Spawning this as a separate thread..>

So I have a filter query with multiple "fq" parameters.  However, I have
noticed that only the first "fq" is used for filtering.  For instance, a
lookup with

...&fq=ClientID:2
&fq=HotelID:234-PPP
&fq={!cache=false}StartDate:[NOW/DAY TO *]

In the above query, results are filtered only by ClientID and not by
HotelID and StartDate.  The same thing happens with "q" query.  Does anyone
know why?

Re: Multiple "fq" parameters are not executed

Posted by Jack Krupansky <ja...@basetechnology.com>.
What are some example values of the HotelID and StateDate fields that are 
not getting filtered out?

Multiple fq queries will be ANDed.

-- Jack Krupansky

-----Original Message----- 
From: Vijay Kokatnur
Sent: Monday, March 10, 2014 4:51 PM
To: solr-user
Subject: Multiple "fq" parameters are not executed

<..Spawning this as a separate thread..>

So I have a filter query with multiple "fq" parameters.  However, I have
noticed that only the first "fq" is used for filtering.  For instance, a
lookup with

...&fq=ClientID:2
&fq=HotelID:234-PPP
&fq={!cache=false}StartDate:[NOW/DAY TO *]

In the above query, results are filtered only by ClientID and not by
HotelID and StartDate.  The same thing happens with "q" query.  Does anyone
know why? 


Re: Multiple "fq" parameters are not executed

Posted by Yonik Seeley <yo...@heliosearch.com>.
Solr has extensive filtering tests.
The first step would be to double check that you see what you think
you are seeing, and then try and create an example to reproduce it.

For example, this works fine with the "example" data, and is of the
same form as your query:
http://localhost:8983/solr/query
?q=*:*
&fq=inStock:true
&fq={!cache=false}text:solr

-Yonik
http://heliosearch.org - solve Solr GC pauses with off-heap filters
and fieldcache


On Mon, Mar 10, 2014 at 4:51 PM, Vijay Kokatnur
<ko...@gmail.com> wrote:
> <..Spawning this as a separate thread..>
>
> So I have a filter query with multiple "fq" parameters.  However, I have
> noticed that only the first "fq" is used for filtering.  For instance, a
> lookup with
>
> ...&fq=ClientID:2
> &fq=HotelID:234-PPP
> &fq={!cache=false}StartDate:[NOW/DAY TO *]
>
> In the above query, results are filtered only by ClientID and not by
> HotelID and StartDate.  The same thing happens with "q" query.  Does anyone
> know why?

Re: Multiple "fq" parameters are not executed

Posted by Erick Erickson <er...@gmail.com>.
Having a couple of docs that aren't being
returned that you think should be would
help.

It's tangential, but you might get better
performance out of this when you get over
your initial problem by using something like
fq=StartDate:[NOW/DAY TO NOW/DAY+1DAY]

That'll filter on all docs with startDate of this calendar
day. It will be cached and reused until midnight.
Of course if you have docs in your index that have
StartDate of NOW+1MINUTE, that should _not_
be shown you have to use the form you already have,
and it's quite correct to specify cache=false..

Best,
Erick

On Mon, Mar 10, 2014 at 4:51 PM, Vijay Kokatnur
<ko...@gmail.com> wrote:
> <..Spawning this as a separate thread..>
>
> So I have a filter query with multiple "fq" parameters.  However, I have
> noticed that only the first "fq" is used for filtering.  For instance, a
> lookup with
>
> ...&fq=ClientID:2
> &fq=HotelID:234-PPP
> &fq={!cache=false}StartDate:[NOW/DAY TO *]
>
> In the above query, results are filtered only by ClientID and not by
> HotelID and StartDate.  The same thing happens with "q" query.  Does anyone
> know why?