Postgres Full Text Search

Build search inside PostgreSQL and know when to stop: decide with numbers first (corpus size, query rate, faceting, synonyms), then add a stored generated tsvector column (PostgreSQL 12 and later) with setweight, a GIN index, websearch_to_tsquery for raw user input instead of to_tsquery, ts_rank_cd with a chosen normalisation, a deliberately picked text-search configuration ('simple' for names and codes), unaccent, pg_trgm GIN indexes instead of ILIKE '%term%', keyset pagination, and written thresholds at which a search engine takes over. Use for "do we need Elasticsearch for this", "add search to our Postgres app", "tsvector and GIN setup", "ILIKE '%term%' is too slow" or "fuzzy match in Postgres". Not for engine-side ranking (search-relevance-tuning), Elasticsearch mappings (search-mapping-design) or a slow statement in general (sql-performance).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 13f719848c

Frequently asked questions

npx get-skill add greenblacked/postgres-full-text-search