bq:  Is the Filter Cache used for the OR'ed fq?

The filter cache is actually pretty simple conceptually. It's
just a map where the key is the fq and the value is the set
of documents that satisfy that fq (we'll skip the implementation
here, just think of it as the list of all the docs that the fq selects).

Solr doesn't attempt to do much with the key, just think of it
as a single string. Whether or not an fq is reused from the
cache depends upon whether the key is in the map.

So fq=id:(1 OR 2 OR 3) will just look to see if
"id:(1 OR 2 OR 3)" is a key. If so, it'll just use the
document list stored in the cache.

It won't match
"id:(1 OR 2)"
or
"id:(2)
or
"id:1 OR id:2 OR id:3"

In other words, there's no attempt to decompose the fq clause
and store parts of it in the cache, it's exact-match or
nothing.

Hope that helps
Erick

On Mon, Feb 13, 2012 at 2:17 PM,  <spr...@gmx.eu> wrote:
> Hi,
>
> how efficent is such an query:
>
> q=some text
> fq=id:(1 OR 2 OR 3...)
>
> Should I better use q:some text AND id:(1 OR 2 OR 3...)?
>
> Is the Filter Cache used for the OR'ed fq?
>
> Thank you
>

Reply via email to