配置 dismax requesthandlar 以增强字段
我想应用增强搜索。我希望如果查询词同时出现在描述和名称中,则比描述字段中包含查询词的文档在搜索结果中排名更高。为此,我将 dismax 请求处理程序配置为:
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" default="true" >
<lst name="defaults">
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<str name="qf">
text^0.5 name^1.0 description^1.5
</str>
<str name="fl">
UID_PK,name,price,description
</str>
<str name="mm">
2<-1 5<-2 6<90%
</str>
<int name="ps">100</int>
<str name="q.alt">*:*</str>
<str name="f.name.hl.fragsize">0</str>
<str name="f.name.hl.alternateField">name</str>
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
</lst>
</requestHandler>
但我在搜索结果中没有发现任何效果。我还需要做一些配置才能看到效果吗?
I want to apply boost for searching. i want that if a query term occur both in description,name than docs having query term in description field come high in search results. for this i configure dismax request handler as:
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" default="true" >
<lst name="defaults">
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<str name="qf">
text^0.5 name^1.0 description^1.5
</str>
<str name="fl">
UID_PK,name,price,description
</str>
<str name="mm">
2<-1 5<-2 6<90%
</str>
<int name="ps">100</int>
<str name="q.alt">*:*</str>
<str name="f.name.hl.fragsize">0</str>
<str name="f.name.hl.alternateField">name</str>
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
</lst>
</requestHandler>
But i am not finding any effect in my search results. do i need to do some more configuration to see the effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论