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 Peter Karich <pe...@yahoo.de> on 2010/08/18 00:29:28 UTC

queryResultCache has no hits for date boost function

Hi all,

my queryResultCache has no hits. But if I am removing one line from the
bf section in my dismax handler all is fine. Here is the line:
recip(ms(NOW,date),3.16e-11,1,1)

According to
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents

this should be fine. So what is the problem with this and how could I
fix it?

Regards,
Peter.

PS: the problem raised in the thread 'Improve Query Time For Large Index'.

Re: queryResultCache has no hits for date boost function

Posted by Peter Karich <pe...@yahoo.de>.
Hi Yonik,

would you point me to the Java classes where solr handles a commit or an
optimize and then the date math definitions?

Regards,
Peter.

> On Wed, Aug 18, 2010 at 4:34 PM, Peter Karich <pe...@yahoo.de> wrote:
>   
>> Thanks a lot Yonik! Rounding makes sense.
>> Is there a date math for the 'LAST_COMMIT'?
>>     
> No - but it's an interesting idea!
>
> -Yonik
> http://www.lucidimagination.com
>
>   


Re: queryResultCache has no hits for date boost function

Posted by Peter Karich <pe...@yahoo.de>.
forget to say: thanks again! Now the cache gets hits!

Regards,
Peter.

> On Wed, Aug 18, 2010 at 4:34 PM, Peter Karich <pe...@yahoo.de> wrote:
>   
>> Thanks a lot Yonik! Rounding makes sense.
>> Is there a date math for the 'LAST_COMMIT'?
>>     
> No - but it's an interesting idea!
>
> -Yonik
> http://www.lucidimagination.com
>   

Re: queryResultCache has no hits for date boost function

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Wed, Aug 18, 2010 at 4:34 PM, Peter Karich <pe...@yahoo.de> wrote:
> Thanks a lot Yonik! Rounding makes sense.
> Is there a date math for the 'LAST_COMMIT'?

No - but it's an interesting idea!

-Yonik
http://www.lucidimagination.com

Re: queryResultCache has no hits for date boost function

Posted by Peter Karich <pe...@yahoo.de>.
Thanks a lot Yonik! Rounding makes sense.
Is there a date math for the 'LAST_COMMIT'?

Peter.

> On Tue, Aug 17, 2010 at 6:29 PM, Peter Karich <pe...@yahoo.de> wrote:
>   
>> my queryResultCache has no hits. But if I am removing one line from the
>> bf section in my dismax handler all is fine. Here is the line:
>> recip(ms(NOW,date),3.16e-11,1,1)
>>     
> NOW has millisecond resolution, so it's actually a different query
> each millisecond.
> You could either use a date literal instead of NOW, or use date math
> to round the date and get a better cache hit ratio... like NOW/hour or
> something.
>
> -Yonik
> http://www.lucidimagination.com
>   

Re: queryResultCache has no hits for date boost function

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Aug 17, 2010 at 6:29 PM, Peter Karich <pe...@yahoo.de> wrote:
> my queryResultCache has no hits. But if I am removing one line from the
> bf section in my dismax handler all is fine. Here is the line:
> recip(ms(NOW,date),3.16e-11,1,1)

NOW has millisecond resolution, so it's actually a different query
each millisecond.
You could either use a date literal instead of NOW, or use date math
to round the date and get a better cache hit ratio... like NOW/hour or
something.

-Yonik
http://www.lucidimagination.com