Search code examples
solrboost-functionmorelikethis

Solr MoreLikeThis and using Boost Functions (Boost recent Items)


I have a similar question as in "Boost recent item in MoreLikeThis Solr request handler" Boost recent item in MoreLikeThis Solr request handler

I would like to Boost recent Items returned from the MoreLikeThis Handler or Component. I found out that bf isn't supported for MoreLikeThisHandler as it is a Dismax Parameter.

Therefore I tried following (within my solrconfig.xml):

<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
    <str name="df">id</str>
    <str name="mlt">true</str>
    <str name="mlt.count">10</str>
    <str name="mlt.fl">project,type,summary,description,environment,fixfor,component</str>
    <str name="mlt.mintf">1</str>
    <str name="mlt.mindf">2</str>
    <str name="mlt.boost">true</str>
    <str name="rows">20</str>
    <str name="fl">id,key,project,summary,reporter,assignee,updated,score</str>
    <str name="bf">ms(NOW/HOUR,updated)</str>
</lst>
<!--<arr name="components">
    <str>mlt</str>
</arr>-->

with

<field name="id" type="long" indexed="true" stored="true" required="true" multiValued="false" termVectors="true"/><!-- is termVector by long needed? -->
...
<field name="key" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
...
<field name="description" type="text_general" indexed="true" stored="false" required="true" multiValued="false" termVectors="true"/>
...
<field name="updated" type="date" indexed="true" stored="true" required="false" multiValued="false"/>

Solution

  • Mlt boost does not seem to be supported.
    You can probably check the Mlt Sort Patch SOLR-1545