PostgreSQL full-text search vs pg_trgm for a Q&A site

asked 17 days ago305 viewsen

4

Building search for a Q&A platform. Should I use tsvector/tsquery or the pg_trgm extension for fuzzy title matching? Content is multilingual.

🤖 AI diagnosis

AI-generated. Not an answer — the community below confirms or corrects it. Always verify before relying on it.

asked 17 days ago
  • Thanks, this helped. Did you also try clearing the cache?

    jamesetienne 5 days ago

1 Answer

3
Accepted answer

For a multilingual Q&A site use tsvector with the simple configuration (no language-specific stemming) plus pg_trgm on the title for fuzzy matches. Combine ranks: ts_rank_cd for body, similarity() for title, weighted.

Sign in to tell others whether this worked.

answered 17 days ago

Sign in and verify your email to post an answer.