有没有办法可以向 Lucene.NET 提供预定义的相关术语列表?

发布于 2024-09-04 20:36:00 字数 285 浏览 1 评论 0原文

我知道我可以在搜索过程中为术语指定“提升因子”,如 中所述http://lucene.apache.org/java/2_4_0/queryparsersyntax.html

我的问题是:我可以为 Lucene 提供预定义的相关表吗?

例如,我可以说“椅子”和“桌子”是相关词,提升系数为 4,所有后续搜索都会尊重这一点。

I know I can, during search, specify a "boost factor" to a term as described in http://lucene.apache.org/java/2_4_0/queryparsersyntax.html.

My question is: Can I provide Lucene with a predefined table of relevance?

For instance, I could say that "chair" and "table" are relevant words with a boost factor of 4 and all subsequent searches would respect that.

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

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

发布评论

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

评论(1

无力看清 2024-09-11 20:36:00

在索引时,您可以使用有效负载 - 请参阅 http: //www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads。您的特殊术语会使用有效负载进行编码,在查询时,可以对其进行解码并用于提供额外的提升。

或者,您可以扩展现有的 QueryParser 来为您的特殊术语提供额外的提升因子。

At index time you can use Payloads -- See http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads . Your special terms get encoded with a payload which, at query time, can be decoded and used to give an extra boost.

Alternatively, you might be able to extend the existing QueryParser to give your special terms an extra boost factor.

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