Post

Postgres has full-text search, but it has some limitations: - GIN indexes aren’t optimized for ranking - ts_rank doesn’t match modern relevance algorithms like BM25 - No fuzzy search or typo tolerance - Slow faceted aggregations

pg_search fixes all of this: - Uses a Rust-powered Tantivy index instead of GIN - Implements BM25 ranking, same as Elastic - Supports prefix search, typo tolerance, JSON-aware search - With real-time updates, no manual reindexing

0 reposts1 like

We tested pg_search in Neon and full-text search queries were up to 1,000x faster than Postgres' native full-text search: - COUNT(*) with search: 22,214ms → 770ms: 29x faster - Top-N ranked search: 38,797ms → 81ms: 497x faster - Filtered search: 31,890ms → 29ms: 1,100x faster

pg_search is already available for all Neon databases in AWS regions using Postgres 17. If you’re in Azure or using other versions of Postgres, don’t worry, we’ll get to you shortly. To install the extension, run: