我在浏览网页寻找索引和搜索框架,并偶然发现Solr。 我们绝对需要的功能是根据包含命中的字段来提升结果。基于包含命中的字段提升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>
我想例如结合标题,alternative_title和情节字段到一个搜索栏,这之后是不是太困难查看Solr/Lucene文档和教程。 但是我也希望有一个标题命中的电影有比score_title命中更高的分数,而他们轮到他们的分数应该高于情节字段中的命中。 有没有什么方法可以在xml中表示这种评分,还是我们需要开发一些自定义评分算法?
请注意,我给出的例子是虚构的,真实的数据可能包含100多个字段。
由于提前,
汤姆