Solr:按距离列出结果

发布于 2024-11-06 15:24:00 字数 141 浏览 7 评论 0 原文

我想将一些参数传递给 Solr,这些参数应该会影响结果的权重(我不想过滤掉不符合这些条件的结果)。

例如,我想要一个语言属性,如果我将用户的语言传递给搜索引擎,我希望得到与首先列出的语言相匹配的结果。作为 Solr 的新手,我想知道这是否以及如何可能!

I'd like to pass some parameters to Solr that should afflict the weighting of the results (I do not want to filter away results that do not match these criterias).

E.g. I'd like to have a language attribute, and if i pass the user's language to the search engine I'd like to have the results matching the language listed first. As a newbie to Solr I'd like to know if and how this is possible!

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

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

发布评论

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

评论(1

简单气质女生网名 2024-11-13 15:24:00

是的,通过使用 boost 函数可以实现这一点。请参阅此常见问题解答条目DisMaxQueryPlugin 的增强函数(dismax 查询解析器是默认解析器)。

Yes, that's possible by using boost functions. See this FAQ entry or the description of boost functions for the DisMaxQueryPlugin (the dismax query parser is the default parser).

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