Boost Solr结果基于包含命中的字段
我正在浏览网页寻找索引和搜索框架,并偶然发现索尔。
我们绝对需要的功能是根据命中包含的字段来提升结果。
一个小例子:
考虑这样的记录:
<movie>
<title>The Dark Knight</title>
<alternative_title>Batman Begins 2</alternative_title>
<year>2008</year>
<director>Christopher Nolan</director>
<plot>Batman, Gordon and Harvey Dent are forced to deal with the chaos unleashed by an anarchist mastermind known only as the Joker, as it drives each of them to their limits.</plot>
</movie>
我想将title
,alternative_title
和plot
字段组合成一个搜索字段,这在查看Solr / Lucene文档和教程后并不太难。
但是我也希望在title
中获得一分的电影得分高于在alternative_title
上的命中,而那些在plot
领域的得分应该高于命中率。
有没有办法在XML中表明这种评分,还是我们需要开发一些自定义评分算法?
还请注意,我给出的示例是虚构的,真实数据可能包含100多个字段。
没有找到相关结果
已邀请:
3 个回复
闪票仇门韧
碧肮械淌设
在查询时执行此操作的优点是,您可以动态调整提升值,以匹配您拥有的任何相关标准。因此,如果10的提升值太高,您可以相应调整它。
骇毖煽洁铂