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 Renaud Delbru <re...@deri.org> on 2011/01/28 20:22:16 UTC

Filter Query, Filter Cache and Hit Ratio

Hi,

I am looking for some more information on how the filter cache is 
working, and how the hit are incremented.

We are using filter queries for certain predefined value, such as the 
timestamp:[2011-01-21T00:00:00Z+TO+NOW] (which is the current day). From 
what I understand from the documentation:
"the filter cache stores the results of any filter queries ("fq" 
parameters) that Solr is explicitly asked to execute. (Each filter is 
executed and cached separately. When it's time to use them to limit the 
number of results returned by a query, this is done using set 
intersections.)"
So, we were imagining that is two consecutive queries (as the one above) 
was using the same timestamp filter query, the second query will take 
advantage of the filter cache, and we would see the number of hits 
increasing (hit on the cached timestamp filter query) . However, this is 
not the case, the number of hits on the filter cache does not increase 
and stays very low. Is it normal ?

INFO: [] webapp=/siren path=/select 
params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=true&fq=timestamp:[2011-01-21T00:00:00Z+TO+NOW]&fq=domain:my.wordpress.com&fsv=true} 
hits=0 status=0 QTime=139
INFO: [] webapp=/siren path=/select 
params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=true&fq=timestamp:[2011-01-21T00:00:00Z+TO+NOW]&fq=domain:syours.wordpress.com&fsv=true} 
hits=0 status=0 QTime=138

-- 
Renaud Delbru


Re: Filter Query, Filter Cache and Hit Ratio

Posted by Renaud Delbru <re...@deri.org>.
Thanks a lot, this totally makes sense but it was hard to figure this out.

cheers
-- 
Renaud Delbru

On 28/01/11 20:39, cbennett@job.com wrote:
> Ooops,
>
> I meant NOW/DAY
>
>> -----Original Message-----
>> From: cbennett@job.com [mailto:cbennett@job.com]
>> Sent: Friday, January 28, 2011 3:37 PM
>> To: solr-user@lucene.apache.org
>> Subject: RE: Filter Query, Filter Cache and Hit Ratio
>>
>> Hi,
>>
>> You've used NOW in the range query which will give a date/time accurate
>> to
>> the millisecond, try using NOW\DAY
>>
>> Colin.
>>
>>> -----Original Message-----
>>> From: Renaud Delbru [mailto:renaud.delbru@deri.org]
>>> Sent: Friday, January 28, 2011 2:22 PM
>>> To: solr-user@lucene.apache.org
>>> Subject: Filter Query, Filter Cache and Hit Ratio
>>>
>>> Hi,
>>>
>>> I am looking for some more information on how the filter cache is
>>> working, and how the hit are incremented.
>>>
>>> We are using filter queries for certain predefined value, such as the
>>> timestamp:[2011-01-21T00:00:00Z+TO+NOW] (which is the current day).
>>> From
>>> what I understand from the documentation:
>>> "the filter cache stores the results of any filter queries ("fq"
>>> parameters) that Solr is explicitly asked to execute. (Each filter is
>>> executed and cached separately. When it's time to use them to limit
>> the
>>> number of results returned by a query, this is done using set
>>> intersections.)"
>>> So, we were imagining that is two consecutive queries (as the one
>>> above)
>>> was using the same timestamp filter query, the second query will take
>>> advantage of the filter cache, and we would see the number of hits
>>> increasing (hit on the cached timestamp filter query) . However, this
>>> is
>>> not the case, the number of hits on the filter cache does not
>> increase
>>> and stays very low. Is it normal ?
>>>
>>> INFO: [] webapp=/siren path=/select
>>>
>> params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=t
>>> rue&fq=timestamp:[2011-01-
>>> 21T00:00:00Z+TO+NOW]&fq=domain:my.wordpress.com&fsv=true}
>>> hits=0 status=0 QTime=139
>>> INFO: [] webapp=/siren path=/select
>>>
>> params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=t
>>> rue&fq=timestamp:[2011-01-
>>> 21T00:00:00Z+TO+NOW]&fq=domain:syours.wordpress.com&fsv=true}
>>> hits=0 status=0 QTime=138
>>>
>>> --
>>> Renaud Delbru
>>
>>
>
>
>


RE: Filter Query, Filter Cache and Hit Ratio

Posted by cb...@job.com.
Ooops,

I meant NOW/DAY 

> -----Original Message-----
> From: cbennett@job.com [mailto:cbennett@job.com]
> Sent: Friday, January 28, 2011 3:37 PM
> To: solr-user@lucene.apache.org
> Subject: RE: Filter Query, Filter Cache and Hit Ratio
> 
> Hi,
> 
> You've used NOW in the range query which will give a date/time accurate
> to
> the millisecond, try using NOW\DAY
> 
> Colin.
> 
> > -----Original Message-----
> > From: Renaud Delbru [mailto:renaud.delbru@deri.org]
> > Sent: Friday, January 28, 2011 2:22 PM
> > To: solr-user@lucene.apache.org
> > Subject: Filter Query, Filter Cache and Hit Ratio
> >
> > Hi,
> >
> > I am looking for some more information on how the filter cache is
> > working, and how the hit are incremented.
> >
> > We are using filter queries for certain predefined value, such as the
> > timestamp:[2011-01-21T00:00:00Z+TO+NOW] (which is the current day).
> > From
> > what I understand from the documentation:
> > "the filter cache stores the results of any filter queries ("fq"
> > parameters) that Solr is explicitly asked to execute. (Each filter is
> > executed and cached separately. When it's time to use them to limit
> the
> > number of results returned by a query, this is done using set
> > intersections.)"
> > So, we were imagining that is two consecutive queries (as the one
> > above)
> > was using the same timestamp filter query, the second query will take
> > advantage of the filter cache, and we would see the number of hits
> > increasing (hit on the cached timestamp filter query) . However, this
> > is
> > not the case, the number of hits on the filter cache does not
> increase
> > and stays very low. Is it normal ?
> >
> > INFO: [] webapp=/siren path=/select
> >
> params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=t
> > rue&fq=timestamp:[2011-01-
> > 21T00:00:00Z+TO+NOW]&fq=domain:my.wordpress.com&fsv=true}
> > hits=0 status=0 QTime=139
> > INFO: [] webapp=/siren path=/select
> >
> params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=t
> > rue&fq=timestamp:[2011-01-
> > 21T00:00:00Z+TO+NOW]&fq=domain:syours.wordpress.com&fsv=true}
> > hits=0 status=0 QTime=138
> >
> > --
> > Renaud Delbru
> 
> 
> 





RE: Filter Query, Filter Cache and Hit Ratio

Posted by cb...@job.com.
Hi,

You've used NOW in the range query which will give a date/time accurate to
the millisecond, try using NOW\DAY

Colin.

> -----Original Message-----
> From: Renaud Delbru [mailto:renaud.delbru@deri.org]
> Sent: Friday, January 28, 2011 2:22 PM
> To: solr-user@lucene.apache.org
> Subject: Filter Query, Filter Cache and Hit Ratio
> 
> Hi,
> 
> I am looking for some more information on how the filter cache is
> working, and how the hit are incremented.
> 
> We are using filter queries for certain predefined value, such as the
> timestamp:[2011-01-21T00:00:00Z+TO+NOW] (which is the current day).
> From
> what I understand from the documentation:
> "the filter cache stores the results of any filter queries ("fq"
> parameters) that Solr is explicitly asked to execute. (Each filter is
> executed and cached separately. When it's time to use them to limit the
> number of results returned by a query, this is done using set
> intersections.)"
> So, we were imagining that is two consecutive queries (as the one
> above)
> was using the same timestamp filter query, the second query will take
> advantage of the filter cache, and we would see the number of hits
> increasing (hit on the cached timestamp filter query) . However, this
> is
> not the case, the number of hits on the filter cache does not increase
> and stays very low. Is it normal ?
> 
> INFO: [] webapp=/siren path=/select
> params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=t
> rue&fq=timestamp:[2011-01-
> 21T00:00:00Z+TO+NOW]&fq=domain:my.wordpress.com&fsv=true}
> hits=0 status=0 QTime=139
> INFO: [] webapp=/siren path=/select
> params={wt=javabin&rows=0&version=2&fl=id,score&start=0&q=*:*&isShard=t
> rue&fq=timestamp:[2011-01-
> 21T00:00:00Z+TO+NOW]&fq=domain:syours.wordpress.com&fsv=true}
> hits=0 status=0 QTime=138
> 
> --
> Renaud Delbru