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 da...@ontrenet.com on 2012/02/21 19:25:41 UTC
filter query or boolean?
Hi,
Which is faster for boolean compound expressions. filter queries or a
single query with boolean expressions?
For that matter, is there any difference other than maybe speed?
thanks
Re: filter query or boolean?
Posted by Erick Erickson <er...@gmail.com>.
Apples and oranges here.
Filter queries do NOT contribute to score. But they are cached so
if you have a frequent use-case for filtering, you'll get much
faster performance. OTOH, if your filter queries are never
repeated, filter queries aren't helpful.
So if correctness isn't defined by the fq clause being included
in the relevance score, you're *usually* better off using filter
queries...
Best
Erick
On Tue, Feb 21, 2012 at 1:25 PM, <da...@ontrenet.com> wrote:
>
> Hi,
> Which is faster for boolean compound expressions. filter queries or a
> single query with boolean expressions?
> For that matter, is there any difference other than maybe speed?
>
> thanks