Search problems in 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
5 Likes

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.

Has nobody met this problem? :fearful:

Unfortunately accents can’t be ignored because it would result in inaccurate results. Where should I look to fix this issue? Maybe downgrading back to 2.2 (it’d be just a temporary fix though :frowning: )?

Any idea is welcome!

I still don’t understand the problem.

Post an exact chunk of text here with behaviour you would expect. We can then test this on local.

2 Likes

Search term: “kávé in:title” (it doesn’t work without in:title either)

A snippet from results:

  • Szezámos káposzta
  • Káposztás lepény
  • A káromkodásról és csúnya beszédről
  • Diós, csokis masala kávé
  • Káposztás pizza
  • Kávékoncentrátum házilag

The correct result should be:

  • Diós, csokis masala kávé
  • Diós, tejes kávé
  • Kávékoncentrátum házilag

Besides the unrelevant results some valid ones are not listed at all.

Thanks a lot!

And you confirm 100% that search ignore accents in site setting is unchecked and that you did a reindex after unchecking that?

I did the reindex after you’ve mentioned in your post and it completed without any issues.

Any update on this issue?

I just tested on try.discourse.org and created 5 topics with the titles you provided.

Then, I searched for “kávé in:title” and got these results

Which looks correct to me :man_shrugging:

Can you show us the list of all the site settings you’ve changed?
(:warning: make sure you scrap all sensitive values though)

2 Likes

Thank you for looking into this problem :+1:

Branding was left out there are only images.

1 Like

Just tried locally with the default locale set to “magyar” and it works as well

Can you make sure you upgrade to latest and check again?

1 Like

Yes but unfortunately it did not help :frowning:

I’ve made a fresh local install and “kávé” worked OK but some other words did not. It seems the problem is related to the full text search in PostgreSQL and how the text is parsed. For example from search word “kávé” will be “ká” after normalization and that normalized form will be matched to the text so “vé” and “poszta” are both correct results for the FTS :slight_smile:

I hope the situation will improve with using hunspell dictionaries in PostgreSQL but currently the Hungarian one is broken :sob:

2 Likes