用于用户搜索输入的最佳 lucene 查询

发布于 2024-10-26 08:58:05 字数 216 浏览 8 评论 0原文


我有包含 1,000,000 条记录的新闻存储 我使用 lucene 库来全文搜索我的新闻主题(标题、正文、新闻日期...) 我需要找到最佳查询,以便从用户输入中找到最相关的结果 我应该采取什么策略或算法用于实现此目的

现在我使用类似的东西(标题^3.0主体^2.0)但我认为它很简单我正在寻找更复杂的算法以获得更相关的结果。

如果您能帮助我找到我的溢出朋友,我真的非常感激!

I have news storage with 1,000,000 records Im using lucene library for fulltext searching my news hast (title, body, news date, ...) i need to find the best query for finding most relevant results from user input what strategy or algorithm i should use for achieve this

now im using something like this (title^3.0 body^2.0) but i think its to simple i'm searching for more sophisticated algorithm to get more relevant results.

I really really appreciate if you help me finding that my overflow friends !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情绪失控 2024-11-02 08:58:05

提高搜索相关性需要时间和迭代改进。

LucidImagination 团队写了一篇很好的文章(虽然非常基于 solr):
http://www.lucidimagination.com /Community/Hear-from-the-Experts/Articles/Search-Application-Relevance-Issues

您可能需要分析日志并将每个文档的综合浏览量添加到索引中,以便您可以将其纳入排序顺序。

只要捕捉到幅度变化,这些数字就不必非常准确。

您还应该分析日志中的拼写错误。清醒想象的人也有一些关于索引它们的播客或博客。

Improving search relevance takes time and iterative refinement.

The LucidImagination team have a good write up (very solr based though):
http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Search-Application-Relevance-Issues

You may want to analyse logs and add pageviews per doc into your index so you can factor that in your sort order.

The figures don't have to be really accurate as long as magnitude variations are captured.

You should also analyse logs for mis-spellings. The lucidimagination guys had some a podcast or blog about indexing them as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文