# pgx-bm25 1.0 brings ranked full-text search into PostgreSQL's index layer

PGX's new PostgreSQL extension implements BM25 relevance ranking as an index access method, using the database's own storage, write-ahead logging and replication rather than a separate search service.

The third-party pgx-bm25 1.0 extension gives PostgreSQL 17 and 18 native-index BM25 ranked retrieval with ordered scans and no external engine, but it is not built into PostgreSQL core and has important planner and RLS caveats.

- Status: Active
- Published: 2026-10-08T17:56:20+13:00
- Updated: 2026-10-08T17:56:20+13:00
- Categories: Web Development, Cloud & Infrastructure, Developer Tools, Databases & Storage
- Tags: BM25, database indexing, full-text search, open source, PostgreSQL
- Canonical HTML: https://beyondthe.news/dossiers/pgx-bm25-1-native-postgresql-ranked-search-index

## What changed

PGX announced pgx-bm25 1.0 on October 7, 2026. It installs as the bm25_native extension and adds USING bm25_native to index text for Okapi BM25 relevance-ranked search. It implements an ordered index scan for ORDER BY relevance with LIMIT, avoiding a separate Sort step in supported plans. Its index data lives in ordinary PostgreSQL index pages and uses PostgreSQL WAL, crash recovery and physical replication. Version 1.0 supports PostgreSQL 17 and 18, with 19 beta tested but not yet supported.

## Why it matters

Small teams building internal search, document retrieval or text-heavy SaaS features may be able to get relevance-ranked full-text results from an existing PostgreSQL cluster instead of deploying and synchronising another search engine. This is a third-party C extension, not a PostgreSQL core feature; operator choice depends on ranking quality, query shapes, hosted-database extension permissions and index maintenance trade-offs.

## What 1.0 actually adds

Create the bm25_native extension, build an index with USING bm25_native (body), then use @@@ to match text and ORDER BY body &@@ 'query' to retrieve relevance-ranked results. PGX says ordered index scans can return top-k results without a separate sorting stage. The index uses PostgreSQL's WAL and replication mechanisms rather than maintaining an external search service.

## What it does not replace

It does not make PostgreSQL's built-in tsvector search obsolete and is not a drop-in replacement for every Lucene, Meilisearch or Elasticsearch workload. It needs PostgreSQL 17 or 18 and server development headers for installation. Managed Postgres platforms that do not allow custom C extensions may not support it.

## Planner and row-level-security caveats

The project README warns that its match operator can behave differently if evaluated as a filter rather than through its index, including when row-level security applies or an OR expression prevents index use. Some field-scoped queries then raise feature_not_supported instead of silently changing semantics. It currently lacks bitmap index scan support. Teams relying on RLS or complex query plans should test actual plans and results before production use.

## Evidence and scope

The October 7 PostgreSQL announcement and the maintained source repository establish the release, installation interface and architectural claims. Independent technology coverage confirms the release, but public performance comparisons remain primarily project-authored; no broad independent latency, recall or concurrency validation was established in this pass.

## Key details

- Announced October 7, 2026 by PGX, Inc.; version 1.0.
- Extension name bm25_native; PostgreSQL index access method USING bm25_native.
- Supports PostgreSQL 17 and 18; PostgreSQL 19 beta tested, not officially supported.
- Ranked ordered index scans avoid a separate Sort stage in supported top-k query plans.
- Index pages inherit PostgreSQL WAL, crash recovery and physical replication.
- Pure C extension built with PGXS, not a core PostgreSQL built-in.
- No bitmap scans; row-level security and filter paths can affect field-scoped query behaviour.
- Independent production-scale benchmarks and managed-provider availability remain unverified.

## Builder takeaways

- Evaluate whether BM25 ranked search can remain inside an existing PostgreSQL cluster before adding an external search service.
- Verify whether your managed Postgres service permits installing a custom C extension.
- Test EXPLAIN plans and correctness for RLS-protected tables, OR conditions, multi-column indexes and field-scoped queries.
- Compare relevance and throughput with your current tsvector or external search approach using your own corpus.
- Plan extension upgrades, backup/restore and replica compatibility as with any non-core index extension.

## What to watch

- Independent query-performance and ranking benchmarks on representative SaaS datasets.
- Managed PostgreSQL provider packaging and support.
- Planner, RLS and bitmap-scan improvements.
- PostgreSQL 19 GA support and on-disk index format upgrade compatibility.

## Uncertainties

- No broad independent benchmark yet establishes the claimed performance across realistic concurrent workloads.
- The extension's custom index method may be unavailable on hosted databases that restrict C extensions.
- README documents query-path differences under RLS; applications should validate correctness.
- PostgreSQL 19 is beta-tested but not an officially supported version.

## Sources

- [pgx-bm25 1.0 announcement on PostgreSQL Announce](https://mail-archive.com/pgsql-announce%40lists.postgresql.org/msg01770.html) — PGX, Inc. / PostgreSQL Announce · primary · 2026-10-07T00:00:00+13:00. Release announcement and supported versions.
- [pgx-bm25 repository and README](https://github.com/pgexperts/pgx-bm25) — PGX, Inc. · primary documentation · 2026-10-08T00:00:00+13:00. Live code, syntax, index design and explicit RLS/planner limitations; page undated, checked Oct 8.
- [PGX releases ranked search extension for PostgreSQL 17 and 18](https://techandbusiness.org/newswire/FjGdzydvEf0VDCYsDOniib) — Tech & Business · secondary · 2026-10-07T00:00:00+13:00. Independent trade report based on PostgreSQL announcement; not independent performance validation.

