Prisma Blog
Read post

Postgres Full-Text Search Instead of Elasticsearch

Postgres has built-in full-text search via tsvector, GIN indexes, websearch_to_tsquery, and ts_rank — covering stemming, relevance ranking, phrase queries, and highlighted snippets without any external search engine. A generated tsvector column with weighted fields (title vs body) plus a GIN index is all that's needed for ranked search. Typo tolerance is handled by the pg_trgm extension using trigram similarity, enabling 'did you mean' suggestions from within the same database. The post walks through a complete TypeScript/Bun demo against Prisma Postgres, showing ranking, stemming, websearch syntax, and trigram fallback in action. Elasticsearch still wins for corpus-wide BM25 relevance tuning, faceted analytics at scale, log/event search, and multi-language pipelines — but for most apps, Postgres already handles the job.

    #postgresql#elk#prisma#full-text-search
Jul 22•12m read time•From prisma.io
Post cover image
Table of contents
Why teams reach for ElasticsearchWhat Postgres full-text search doesBuild the search: one column, one index, one queryWatch it rank real queriesTypo tolerance with pg_trgmWhen you actually need ElasticsearchFrequently asked questionsRecap
209 Impressions
Prisma Blog's image
Prisma Blog

13 Followers

•

88 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard