Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在 lucene 搜索结果中冒泡更新的记录?即。我希望 Lucene 对更接近今天日期的记录给予更高的分数。
谢谢!
我只通过 Solr 使用过 Lucene,但它非常支持根据用户提供的功能提升任意文档。
在你的情况下,我会使用类似的东西:
recip(rord(created_when),1,1000,500)
作为升压功能。我意识到这并不能回答您具体的 Lucene 问题,但如果您可以使用 Solr QueryHandler 来完成,那么您绝对可以在 Lucene 应用程序中完成!