TIN v1.0.6: 2-3x faster, with support for stemming
TIN v1.0.6, PlanetScale's Postgres full-text search index, adds Snowball-based stemming for 18 languages via the rust_stemmers crate and extends its block-max top-k plan to queries with heap-attribute tiebreakers in ORDER BY. On a 150M-document Stack Exchange benchmark, default TIN delivers 3.1-5.0x higher throughput and 2.7-4.4x lower p99 latency than ParadeDB 0.26.0 on x86-64, and still wins when scoring all terms via tin.full_score. Default scoring skips terms appearing in over 10% of documents, which is tunable per query with dense_ratio. x86-64 with AVX-512 is notably faster than Graviton4 for text search, and stemming requires an index rebuild while the speedups do not.
Related posts
- Postgres Full Text Search vs the rest
Supabase mediumAdeptPostgres built-in full text search, using a generated tsvector column with a GIN index and websearch_to_tsquery, performs close to dedicated engines like Typesense, MeiliSearch, OpenSearch and SQLite FTS5 in default configurations on a small movie dataset. Most queries return in a few milliseconds on Postgres. In-memory SQLite was fastest. Only Typesense and MeiliSearch handled misspellings such as "suprman". For basic search needs, Postgres FTS is good enough and adds no new systems to the stack, while dedicated engines offer typo tolerance, prefix search and richer relevancy tuning.
- Comparing Native Postgres, ElasticSearch, and pg_search for Full-Text Search
Neon mediumAdept
Native Postgres full-text search (tsvector/tsquery with GIN indexes) breaks down at scale because ranking by ts_rank must score every matching row and lacks BM25, fuzzy matching and per-field relevance. ElasticSearch fixes search quality and speed but adds a second source of truth, a sync pipeline, eventual consistency and heavy cluster operations. pg_search, a Rust extension built on Tantivy, embeds a BM25 inverted index inside Postgres with transactional updates, fuzzy and phrase queries, snippets and aggregations. On a 10-million-row benchmark it beat native FTS by 20-1000x (e.g. top-N ranked results in 81ms vs 38.8s), and it is pitched for datasets that fit on a single Postgres instance.
- pg_search is Available on Neon
Neon mediumAdept
ParadeDB's pg_search extension, now available on Neon in AWS regions, adds a Tantivy-powered BM25 inverted index to Postgres, bringing relevance ranking, fuzzy matching, faceting, highlighting and JSON-aware search that native tsvector/GIN full-text search lacks. The BM25 index is a covering index across multiple columns, so filters and aggregations are pushed into a single index scan, and it is MVCC-integrated so new data is searchable on commit without ETL. On a 10-million-row log dataset, it built faster than a GIN index (1.63 vs 2.60 min) but was larger (647 vs 176 MB). It beat a GIN/B-tree-tuned Postgres on every query tested, with the largest gains on ranked top-N, count and filtered queries, e.g. 81 ms vs 38.8 s for BM25-ranked top-10.
- Search From a Million Books in Milliseconds With Neon and pg_search
Neon mediumAdept
Swapping the OpenAI-embedding semantic search in Vercel's Next.js Book Inventory template for pg_search's BM25 full-text index on Neon Postgres made title searches over a million Goodreads books roughly 180–236x faster, dropping from about 2.7 seconds to 11–14 ms. The setup loads the dataset into a books table, prewarms the table and index with pg_prewarm, creates a covering bm25 index, and queries with the @@@ operator and paradedb.match in conjunction_mode. On the app side, Drizzle is replaced by Neon's HTTP serverless driver, and Vercel functions are co-located in us-east-2 with the database. Side-by-side tsvector/tsquery and pg_search queries with timings are included for reproduction.
- Build Your Own Full-Text Search CMS with Neon and pg_search
Neon mediumAdept
A minimal CMS built on Postgres with Next.js, Prisma and Zod, using the pg_search extension's BM25 index for full-text search instead of a hosted CMS. Search runs as a three-stage cascade: BM25 keyword search with title/body score boosts (2x title, 2.5x both), then phrase search with slop for multi-word queries, then fuzzy Levenshtein matching whose edit distance scales with query length (1–3). Raw SQL goes through Neon's serverless driver because Prisma can't express pg_search operators, and paradedb.snippet supplies highlighted excerpts. Neon has since deprecated pg_search for new projects.