PostgreSQL full-text search vs pg_trgm for a Q&A site
asked 2 months ago363 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 2 months ago
Patrick Alcin 1.9k
Thanks, this helped. Did you also try clearing the cache?
— jamesetienne 2 months 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 2 months ago
Fabienne Dorval 2.8k
Sign in and verify your email to post an answer.