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 Brian Lamb <br...@journalexperts.com> on 2011/11/17 20:59:26 UTC

Boosting is slow

Hi all,

I have about 20 million records in my solr index. I'm running into a
problem now where doing a boost drastically slows down my search
application. A typical query for me looks something like:

http://localhost:8983/solr/mycore/search/?q=test {!boost
b=product(sum(log(sum(myfield,1)),1),recip(ms(NOW,mydate_field),3.16e-11,1,8))}

I've tried several variations on the boost to see if that was the problem
but even when doing something simple like:

http://localhost:8983/solr/mycore/search/?q=test {!boost b=2}

it is still really slow. Is there a different approach I should be taking?

Thanks,

Brian Lamb

Re: Boosting is slow

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Nov 17, 2011 at 2:59 PM, Brian Lamb
<br...@journalexperts.com> wrote:
> http://localhost:8983/solr/mycore/search/?q=test {!boost b=2}
>
> it is still really slow. Is there a different approach I should be taking?

I just tried what something similar to this (a non-boosted query vs a
simple boosted query)
on a 10M document test index.

#Non boosted
q=myfield:[* TO *] dummy_i:1

#Boosted
q={!boost b=2 v=$qq}
qq=myfield:[* TO *] dummy_i:1

Notes:
  - the dummy was just used to change the query so there would be no
cache it (I set it to something different for each try)
  - "myfield" is a single valued field that only has 10 unique terms
(so the range query should be fast), and does select all 10M docs

My results:  normal=386ms   boosted=481ms

-Yonik
http://www.lucidimagination.com

Re: Boosting is slow

Posted by Brian Lamb <br...@journalexperts.com>.
Any ideas on this one?

On Thu, Nov 17, 2011 at 3:53 PM, Brian Lamb
<br...@journalexperts.com>wrote:

> Sorry, the query is actually:
>
> http://localhost:8983/solr/mycore/search/?q=test{!boost
> b=product(sum(log(sum(myfield,1)),1),recip(ms(NOW,mydate_field),3.16e-11,1,8))}&start=&sort=score+desc,mydate_field+desc&wt=xslt&tr=mysite.xsl
>
>
> On Thu, Nov 17, 2011 at 2:59 PM, Brian Lamb <brian.lamb@journalexperts.com
> > wrote:
>
>> Hi all,
>>
>> I have about 20 million records in my solr index. I'm running into a
>> problem now where doing a boost drastically slows down my search
>> application. A typical query for me looks something like:
>>
>> http://localhost:8983/solr/mycore/search/?q=test {!boost
>> b=product(sum(log(sum(myfield,1)),1),recip(ms(NOW,mydate_field),3.16e-11,1,8))}
>>
>> I've tried several variations on the boost to see if that was the problem
>> but even when doing something simple like:
>>
>> http://localhost:8983/solr/mycore/search/?q=test {!boost b=2}
>>
>> it is still really slow. Is there a different approach I should be taking?
>>
>> Thanks,
>>
>> Brian Lamb
>>
>>
>

Re: Boosting is slow

Posted by Brian Lamb <br...@journalexperts.com>.
Sorry, the query is actually:

http://localhost:8983/solr/mycore/search/?q=test{!boost
b=product(sum(log(sum(myfield,1)),1),recip(ms(NOW,mydate_field),3.16e-11,1,8))}&start=&sort=score+desc,mydate_field+desc&wt=xslt&tr=mysite.xsl

On Thu, Nov 17, 2011 at 2:59 PM, Brian Lamb
<br...@journalexperts.com>wrote:

> Hi all,
>
> I have about 20 million records in my solr index. I'm running into a
> problem now where doing a boost drastically slows down my search
> application. A typical query for me looks something like:
>
> http://localhost:8983/solr/mycore/search/?q=test {!boost
> b=product(sum(log(sum(myfield,1)),1),recip(ms(NOW,mydate_field),3.16e-11,1,8))}
>
> I've tried several variations on the boost to see if that was the problem
> but even when doing something simple like:
>
> http://localhost:8983/solr/mycore/search/?q=test {!boost b=2}
>
> it is still really slow. Is there a different approach I should be taking?
>
> Thanks,
>
> Brian Lamb
>
>