v2.3 中的搜索问题

Hello,

I’ve upgraded our Discourse instance from 2.2.6 to 2.3. Unfortunately we’ve noticed some issues with search:

  • the result contains mostly totally unrelated posts (many posts don’t have the search phrase)
  • the search ignores the options (like Matching in title only)

It shows up with terms containing accent like Hungarian word “tészta” :slight_smile: Ignore accents when searching for text. in admin settings is unchecked.

If you ever amend the site setting search ignore accents you must rebuild the full search index with:

./launcher enter app
rake search:reindex

Thanks for the hint! Unfortunately it doesn’t solve the problem :frowning:

It’s quite weird that some pre-2.3 posts contain search URLs (some has multi-word search terms with different accents) which are working fine and return valid result while new search queries are not working and give back not relevant posts.

有没有人遇到过这个问题?:fearful:

不幸的是,无法忽略重音符号,否则会导致结果不准确。我应该从哪里着手解决这个问题?也许降级回 2.2 版本(但这只是临时解决方案 :frowning: )?

欢迎提供任何建议!

我仍然不明白问题所在。

请在这里贴出一段具体的文本,并说明你期望的行为。这样我们可以在本地进行测试。

搜索词:“kávé in:title”(即使不使用 in:title 也无法正常工作)

结果片段:

  • 芝麻卷心菜
  • 卷心菜饼
  • 关于诅咒和粗话
  • 核桃巧克力马萨拉咖啡
  • 卷心菜披萨
  • 自制咖啡浓缩液

正确的结果应该是:

  • 核桃巧克力马萨拉咖啡
  • 核桃牛奶咖啡
  • 自制咖啡浓缩液

除了不相关的结果外,一些有效的结果根本没有列出。

非常感谢!

您是否确认 100% 已在站点设置中取消勾选“搜索忽略重音”,并在取消勾选后重新建立了索引?

我在您帖子中提到的内容之后执行了重新索引,整个过程顺利完成,未出现任何问题。

这个问题有更新吗?

我刚刚在 try.discourse.org 上进行了测试,并用您提供的标题创建了 5 个主题。

然后,我搜索了“kávé in:title”,得到了以下结果:

在我看来,这是正确的 :man_shrugging:

您能向我们展示您已更改的所有站点设置列表吗?
:warning: 请务必抹去所有敏感值

感谢您调查此问题 :+1:

品牌部分被遗漏了,那里只有图片。

刚刚在本地测试,默认语言设置为“magyar”,也能正常工作。

请确保您已升级到最新版本,然后再次检查。

是的,但不幸的是这并没有帮助 :frowning:

我刚完成了一次全新的本地安装,“kávé”能正常工作,但其他一些词却不行。问题似乎与 PostgreSQL 中的全文搜索及其文本解析方式有关。例如,搜索词