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 Dodd <pd...@microsoft.com> on 2014/02/20 20:20:08 UTC
Can set a boost function as a default within requesthandler?
For my search I’ve established a boost function which enhances result
ranking. In a query it looks something like:
q={!boost b=product(answeredStatus, articleType)}connectivity
I’d like to make this boost function a default for all others who use the
search. My default search handler is configured like this in solrConfig.xml:
<requestHandler class="solr.SearchHandler" name="standard" default="true">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="fl">*,score</str>
</lst>
<arr name="components">
<str>collapse</str>
<str>facet</str>
<str>mlt</str>
<str>highlight</str>
<str>stats</str>
<str>debug</str>
</arr>
</requestHandler>
Can I add the boost function as a default in here?
Many thanks,
Peter
--
View this message in context: http://lucene.472066.n3.nabble.com/Can-set-a-boost-function-as-a-default-within-requesthandler-tp4118647.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Can set a boost function as a default within requesthandler?
Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Peter,
According to
http://wiki.apache.org/solr/LocalParams#Parameter_dereferencing
if
q={!dismax qf=myfield}solr rocks
is equivalent to
q={!type=dismax qf=myfield v=$qq}&qq=solr rocks
then
q={!boost b=product(answeredStatus, articleType)}connectivity
is equivalent to
q={!type=boost b=product(answeredStatus, articleType) v=$qq}&qq=connectivity
Then you can define q in defaults section of request handler in solrconfig.xml then pass qq parameter in request.
Ahmet
On Thursday, February 20, 2014 9:32 PM, Peter Dodd <pd...@microsoft.com> wrote:
For my search I’ve established a boost function which enhances result
ranking. In a query it looks something like:
q={!boost b=product(answeredStatus, articleType)}connectivity
I’d like to make this boost function a default for all others who use the
search. My default search handler is configured like this in solrConfig.xml:
<requestHandler class="solr.SearchHandler" name="standard" default="true">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="fl">*,score</str>
</lst>
<arr name="components">
<str>collapse</str>
<str>facet</str>
<str>mlt</str>
<str>highlight</str>
<str>stats</str>
<str>debug</str>
</arr>
</requestHandler>
Can I add the boost function as a default in here?
Many thanks,
Peter
--
View this message in context: http://lucene.472066.n3.nabble.com/Can-set-a-boost-function-as-a-default-within-requesthandler-tp4118647.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Re: Can set a boost function as a default within requesthandler?
Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Peter,
Yes you are correct. Send qq=connectivity with the following defaults section
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="fl">*,score</str>
<str name="q">{!type=boost b=product(answeredStatus, articleType) v=$qq}</str>
</lst>
Alternatively, you can switch to edismax query parser. It has native/built in boost and bf parameters. Former is multiplicative boost, latter is additive boost.
Ahmet
On Friday, February 21, 2014 3:36 AM, Peter Dodd <pd...@microsoft.com> wrote:
So I'd need to change the query syntax to load and pass *qq
*(qq=connectivity) instead of *q* (q=connectivity) ?
--
View this message in context: http://lucene.472066.n3.nabble.com/Can-set-a-boost-function-as-a-default-within-requesthandler-tp4118647p4118703.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Re: Can set a boost function as a default within
requesthandler?
Posted by Peter Dodd <pd...@microsoft.com>.
So I'd need to change the query syntax to load and pass *qq
*(qq=connectivity) instead of *q* (q=connectivity) ?
--
View this message in context: http://lucene.472066.n3.nabble.com/Can-set-a-boost-function-as-a-default-within-requesthandler-tp4118647p4118703.html
Sent from the Solr - User mailing list archive at Nabble.com.