如果查询的单词在索引字段的开头,如何获得更好的Lucene/Solr分数? [英] How to get a better Lucene/Solr score if word queried was at the beginning of the indexed field?

查看:78
本文介绍了如果查询的单词在索引字段的开头,如何获得更好的Lucene/Solr分数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有时会读到一些东西,解释如果在我编入索引的描述的开头发现了我所查询的单词,那么让Lucene/Solr给出更好的分数的方法.在网络上找不到它了.任何人都有方便的链接吗?谢谢.

I read at some point something explaining what to do to have Lucene/Solr give a better score if my queried word was found at the beginning of the description I indexed. Cannot find it anymore on the net. Anybody has the links handy ? Thank you.

推荐答案

有效载荷可以帮助您实现这一目标.实际上,有效负载使您可以任意增强令牌流中的任何令牌,因此您可以根据任何情况进行增强:

Payloads could help you do that. Actually, payloads let you give an arbitrary boost to any token of your token stream, so you can boost depending on anything:

  • 流中的位置
  • 字体粗细
  • 令牌是否包含大写字母,
  • ...

您可以在以下 nice上详细了解有效负载格兰特·英格索尔(Grant Ingersoll)的帖子.

这篇关于如果查询的单词在索引字段的开头,如何获得更好的Lucene/Solr分数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆