我有一个类似的问题,如“在MoreLikeThis Solr请求处理程序中提升最近的项目”Boost recent item in MoreLikeThis Solr request handler
我想提升从MoreLikeThis处理程序或组件返回的最新项目。 我发现MoreLikeThisHandler不支持bf,因为它是Dismax参数。
因此我尝试了(在我的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>-->
与
<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"/>