我有一个类似的问题,如“在 MoreLikeThis Solr 请求处理程序中提升最近的项目”在 MoreLikeThis Solr 请求处理程序中提升最近的项目
我想提升从 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"/>