我有什么办法可以根据 Lucene 中的学期位置更改评分吗?
例如,如果我正在搜索包含“harry”一词的书名索引,则“Dirty Harry”的得分与“Harry Potter”相同,并且当两个项目得分相同时,顺序是随机的。我想提高以我的搜索词(哈利·波特)开头的词的权重。
我宁愿不使用 TermPostionVector,因为这似乎是我只能在搜索和评分完成后才能阅读的内容。
感谢您的时间/考虑。
for example, if I am searching an index of book titles with the term "harry", "Dirty Harry" is scored equally to "Harry Potter", and when two items are equally scored, the order is random. I'd like to weight the one that begins with my search term (Harry Potter) higher.
I would rather not use TermPostionVector as it seems that this is something I can read only after the search and scoring has been completed.
thanks for your time/consideration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查找spanquery。
Look up spanquery.