Search result list truncates topic title after amending it

AI-generated summary

The discussion revolves around an issue where the search result list truncates the topic title after it has been amended. amotl reported this issue and shared a screenshot. eviltrout explained that the site setting use_pg_headlines_for_excerpt is enabled on meta, which causes this truncation as a performance optimization.

tgxworld noted that this setting will be enabled by default in the next release and promised to fix the bug. A PR to fix this issue has been submitted by tgxworld. CvX inquired if enabling use_pg_headlines_for_excerpt by default is still the plan, and tgxworld confirmed it. Additionally, sam mentioned that some bypasses were needed for Chinese locales due to issues with injected spaces.

Hi there,

while working on investigating Database migration chokes on huge value of a "calendar-details" item in table "post_custom_fields", we amended the topic title twice in order to better reflect the reason and outcome of our research into the respective details.

Now, when trying to find the topic back using the search feature at Search results for 'calendar-details' - Discourse Meta, we found that there is some truncation going on when displaying the topic title.

I haven’t seen this before so I wanted to share this with you.

Keep up the good work and with kind regards,
Andreas.

On meta we have enabled the hidden site setting use pg headlines for excerpt which produces this result. It’s a performance optimization introduced in:

https://github.com/discourse/discourse/commit/2193d0243377831caf96d8eaddb859813dae2bb0

4 Likes

SiteSetting.use_pg_headlines_for_excerpt will be true by default in the next release so I’ll have to fix this bug.

4 Likes

I have a PR up to fix this:

https://github.com/discourse/discourse/pull/11544

Thank you for reporting @amotl

3 Likes

Is this still the plan? :smiley:

1 Like

Yup I need to get to this for the next release.

1 Like

Note we needed some bypasses here for Chinese locales (I think) it was injecting tons of spaces.

1 Like