19+ Full-text Search Extensions for PostgreSQL

pg_search, pg_bestmatch, pg_bm25, and other Postgres extensions for advanced full-text search with BM25 ranking. Ranked by GitHub stars.

Last reviewed: May 15, 2026
19 extensions
1
pg_search
8.8k+155 30d

Full text search for PostgreSQL using BM25

Full-text Search·AGPL-3.0·Rust
2
zhparser
856+5 30d

a parser for full-text search of Chinese

Full-text Search·PostgreSQL·C
3
pgroonga
726+5 30d

Use Groonga as index, fast full text search platform for all languages!

Full-text Search·PostgreSQL·C
4
vchord_bm25
368+6 30d

A postgresql extension for bm25 ranking algorithm

Full-text Search·AGPL-3.0·Rust
5
pg_bigm
148+4 30d

create 2-gram (bigram) index for faster full text search.

Full-text Search·PostgreSQL·C
6
pg_bestmatch
96+1 30d

Generate BM25 sparse vector inside PostgreSQL

Full-text Search·Apache-2.0·Rust
7

Czech Hunspell Dictionary

Full-text Search·PostgreSQL·Data
8

German Hunspell Dictionary

Full-text Search·PostgreSQL·Data
9

en_US Hunspell Dictionary

Full-text Search·PostgreSQL·Data
10

French Hunspell Dictionary

Full-text Search·PostgreSQL·Data
11

Nepali Hunspell Dictionary

Full-text Search·PostgreSQL·Data
12

Dutch Hunspell Dictionary

Full-text Search·PostgreSQL·Data
13

Norwegian (norsk) Hunspell Dictionary

Full-text Search·PostgreSQL·Data
14

Portuguese Hunspell Dictionary

Full-text Search·PostgreSQL·Data
15

Russian Hunspell Dictionary

Full-text Search·PostgreSQL·Data
16

Russian Hunspell Dictionary (from AOT.ru group)

Full-text Search·PostgreSQL·Data
17
pg_tokenizer
43+1 30d

Tokenizers for full-text search

Full-text Search·Apache-2.0·Rust
18

determine similarities and distance between strings

Full-text Search·PostgreSQL·C
19

text similarity measurement and index searching based on trigrams

Full-text Search·PostgreSQL·C

What is a PostgreSQL Full-Text Search Extension?

Full-text search extensions go beyond Postgres' built-in tsvector and to_tsquery — they add modern ranking algorithms (BM25, BM25F), faster index types, and richer query syntax. The most prominent is pg_search from ParadeDB, which embeds a Tantivy (Rust) search engine directly in Postgres for sub-100ms relevance-ranked queries over millions of rows. Smaller extensions like pg_bestmatch, prefix, and pg_trgm cover BM25 scoring on heap tables, prefix-matching with GiST indexes, and fuzzy string matching respectively. Together they let teams handle search workloads without standing up Elasticsearch or Meilisearch alongside their primary database.

When to Add a Full-Text Search Extension

Reach for an FTS extension when tsvector ranking falls short — multi-field weighted search, fuzzy/typo tolerance, BM25 relevance, faceted filters, or sub-100ms response over millions of documents. tsvector + ts_rank is fine for blog search and small catalogs (under ~100k docs). pg_search is the upgrade path for product catalogs, document search, and any case where Elasticsearch was the alternative. If you need real-time indexing of arbitrary JSON, distributed cluster scale across regions, or hybrid lexical-plus-vector search beyond what pg_search supports, then Elasticsearch or Meilisearch remain better fits — but most teams can stay on Postgres with pg_search.

Frequently Asked Questions

What's the difference between tsvector and a full-text search extension?
tsvector is Postgres' built-in document type for lexical search — you create a tsvector column, build a GIN index, and query with to_tsquery + ts_rank. It works well for small-to-medium corpora and basic ranking. FTS extensions like pg_search add BM25 (a modern, stronger ranking algorithm), highlighting, faceted filtering, multi-field boosting, and faster index builds via Tantivy. For under 100k documents, tsvector is fine. Above that, pg_search delivers Elasticsearch-grade performance without leaving Postgres.
Should I use Postgres full-text search or Elasticsearch?
Stay on Postgres with pg_search when your search workload is text-only against your primary database — you get one auth model, one backup story, one transactional boundary. Move to Elasticsearch when you need: cross-cluster replication across regions, sub-50ms search at high QPS over tens of millions of docs, real-time indexing of arbitrary JSON schemas, or built-in features like learned-to-rank and percolators. For 90% of B2B SaaS product search, pg_search is enough and significantly simpler to operate.
What is BM25 and why does it matter?
BM25 (Best Matching 25) is the relevance-ranking algorithm used by Elasticsearch, Lucene, and most modern search engines — it considers term frequency, inverse document frequency, and document length normalization to score how well a query matches each document. It's significantly more relevant than Postgres' default ts_rank for natural-language queries. pg_search and pg_bestmatch implement BM25 inside Postgres, giving you Elasticsearch-quality ranking without leaving the database.
How do I install pg_search?
On managed services: pg_search is currently available via ParadeDB's managed offering or self-hosted Docker images — AWS RDS, Supabase, and Neon do not yet ship pg_search in their default extension allow-lists (check the latest docs). On self-hosted Postgres: use ParadeDB's Docker image (paradedb/paradedb) for the simplest setup, or build from source against your existing Postgres install. After installation, run CREATE EXTENSION pg_search; and create a BM25 index with CREATE INDEX ... USING bm25.
Does pg_search work on managed Postgres (RDS, Supabase, Neon)?
Currently no. pg_search requires a shared library and isn't in the default extension allow-lists of major managed providers. ParadeDB offers its own managed service, or you can self-host with their Docker image. AWS RDS, Aurora, Supabase, and Neon support tsvector + GIN out of the box (good enough for most cases), pg_trgm for fuzzy matching, and Aurora/Neon support some additional ranking via pg_bestmatch on certain versions — check the provider's current extension list.

Manage PostgreSQL Visually

1bench is a modern GUI client for PostgreSQL — install extensions, write queries, and inspect schemas without leaving the IDE.

Try 1bench for PostgreSQL