intelligent-internet/psql_bm25s — explained in plain English
Analysis updated 2026-05-18
Add fast, ranked text search directly inside a PostgreSQL database without a separate search service.
Run BM25 style search on data that changes constantly, like a live application database.
Combine text search with vector similarity search for hybrid results in one query.
| intelligent-internet/psql_bm25s | saiprajoth/timescaledb-lab | zombodb/zombodb | |
|---|---|---|---|
| Stars | 127 | 1 | 4,733 |
| Language | PLpgSQL | PLpgSQL | PLpgSQL |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 4/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires installing a PostgreSQL extension and building an index with CREATE INDEX.
psql_bm25s is a PostgreSQL extension, meaning a plugin that adds new capabilities to the PostgreSQL database, that brings BM25 style text search directly into the database itself. BM25 is a well established algorithm used by search engines to rank documents by how well they match a search query, the same basic approach behind many search systems people use every day. The core problem it solves is that existing BM25 search tools tend to work well on data that rarely changes, but struggle once records are constantly being added, updated, or deleted, which is the normal state of a live database. Rebuilding a search index from scratch every time data changes is expensive. psql_bm25s is built specifically to handle frequent changes efficiently, while still returning exact search results and respecting PostgreSQL's usual guarantees around crash recovery, backups, and replication. Once installed, a developer creates a BM25 search index using a standard CREATE INDEX command, then runs searches using ordinary SQL. It handles the usual text preparation steps: breaking text into individual words, normalizing them, removing common filler words, and reducing words to their root form. It can combine scores across multiple text columns in one search, and can also blend traditional text search with vector similarity search for hybrid results. The project publishes benchmark results comparing its query speed against a Python reference implementation and other PostgreSQL search extensions across fifteen standard datasets, reporting notably faster results, especially on large collections of documents. The full README is longer than what was provided.
A PostgreSQL extension that adds fast BM25 text search directly inside the database, built for constantly changing data.
Mainly PLpgSQL. The stack also includes PostgreSQL, PLpgSQL, C.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.