当使用同义词和词干分析时,Solr 能否返回实际使用的最终查询?

发布于 2024-09-15 02:20:22 字数 222 浏览 2 评论 0原文

我希望能够在我的 UI 中显示 solr 用于运行最终查询的查询术语。例如,我可能会输入查询“run”,但在幕后 solr 将使用词干来查询“ran”和“running”,我还可能定义一个同义词,其中包含“run = sprint”。

我想向用户展示,虽然他们输入了“run”,但实际查询是“run ran running sprint”

有什么简单的方法可以做到这一点吗?

谢谢!

I would like to be able to show in my UI what the query terms were that solr used to run the final query. For example, I might type the query "run" but behind the scenes solr will use stemming to also query "ran" and "running", I may also have a synonym defined which has "run = sprint".

I would like to show the user that although they typed in "run" the actual query was "run ran running sprint"

Any easy way to do this?

Thanks!

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

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

发布评论

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

评论(1

少女的英雄梦 2024-09-22 02:20:22

尝试设置 debugQuery=on。请参阅这个

Try setting debugQuery=on. See this and this.

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