"Full-Text-Search"
- PostgreSQL Full-Text Search:tsvector / tsquery / GIN index 跟 pg_trgm fuzzy 三層搜尋
PG 內建 full-text search 用 *tsvector / tsquery / GIN index* 三件組、適合中小規模搜尋(< 100M 文件);pg_trgm 提供 fuzzy match。本文走 FTS 機制(tsvector 是 lexeme + position 的 vector)、3 種 query(match / ranking / weighted)、multi-language support、跟 pg_trgm fuzzy match 互補、5 production 踩雷(dictionary 選錯 / GIN 跟 GiST 取捨 / ranking 評分權重 / multi-language column 處理 / 何時不該用 PG FTS 改 Elasticsearch)