pgx-bm25 1.0: BM25 ranked full-text search as a native PostgreSQL index
What happened
has released version 1.0 of pgx-bm25 , an extension that adds Okapi BM25 ranked full-text search to PostgreSQL as a native index access method. CREATE EXTENSION bm25_native; CREATE INDEX docs_bm25 ON docs USING bm25_native (body); SELECT id, bm25_score(ctid) AS score FROM docs WHERE body @@@ 'quick fox' ORDER BY body &@@ 'quick fox' LIMIT 10; @@@ selects the matching rows and &@@ orders them by relevance.
It provides support for PostgreSQL 17 and 18, and installs as bm25_native . The query runs as an ordered index scan; there is no Sort node.
It is a PostgreSQL index The whole index lives in the index relation's own pages, so it gets WAL logging, crash recovery, and physical replication from core. There is no external search engine and no separate runtime to operate.
Key facts
- has โ released: version 1.0 of pgx-bm25 , an extension that adds Okapi BM25 ranked full-text search to PostgreSQL as a native index access method
Sources & evidence
- PostgreSQL News Primary / official
pgx-bm25 1.0: BM25 ranked full-text search as a native PostgreSQL index โ
https://www.postgresql.org/about/news/pgx-bm25-10-bm25-ranked-full-text-search-as-a-native-postgresql-index-3396/