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 ruby <rs...@gmail.com> on 2017/10/23 21:10:10 UTC

Solr boosting multiple fields using edismax parser.

If I want to boost multiple fields using Edismax query parser, is following
the correct way of doing it:

<requestHandler name="/myHandler" class="solr.SearchHandler">
<lst name="defaults">
<str name="defType">edismax</str>
<str name="bq">field1:(apple)^500</str>  
<str name="bq">field1:(orange)^400</str>  
<str name="bq">field1:(pear)^300</str> 
<str name="bq">field2:(4)^500</str>  
<str name="bq">field2:(2)^100</str>     
<str name="bf">recip(ms(NOW,mod_date),3.16e-11,1,1)</str>
<str name="bf">recip(ms(NOW,creation_date),3.16e-11,1,1)</str>

And if boost is configured in solrconfig.xml, can I still pass additional
boost queries through boost query?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Solr boosting multiple fields using edismax parser.

Posted by ruby <rs...@gmail.com>.
Thanks for your reply.

can the recip function be used to boost  a numeric field here: 

<str name="bf">recip(ord(rating),100,1,1)</str> 










--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Solr boosting multiple fields using edismax parser.

Posted by Aravind Durvasula <ar...@gmail.com>.
You can pass additional bq params in the query.

~Aravind

On Oct 23, 2017 4:10 PM, "ruby" <rs...@gmail.com> wrote:

> If I want to boost multiple fields using Edismax query parser, is following
> the correct way of doing it:
>
> <requestHandler name="/myHandler" class="solr.SearchHandler">
> <lst name="defaults">
> <str name="defType">edismax</str>
> <str name="bq">field1:(apple)^500</str>
> <str name="bq">field1:(orange)^400</str>
> <str name="bq">field1:(pear)^300</str>
> <str name="bq">field2:(4)^500</str>
> <str name="bq">field2:(2)^100</str>
> <str name="bf">recip(ms(NOW,mod_date),3.16e-11,1,1)</str>
> <str name="bf">recip(ms(NOW,creation_date),3.16e-11,1,1)</str>
>
> And if boost is configured in solrconfig.xml, can I still pass additional
> boost queries through boost query?
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>