From ts_rank to BM25. Introducing pg_textsearch: True BM25 Ranking and Hybrid Retrieval Inside Postgres
Blog post from Tiger Data
pg_textsearch is a new PostgreSQL extension designed to enhance AI-native applications by providing a modern BM25 ranking system, combining vector and keyword search capabilities within a single database. This extension addresses the limitations of Postgres' native full-text search by introducing improvements like inverse document frequency weighting, term frequency saturation, and length normalization to ensure high-quality search results. It is particularly beneficial for systems such as Retrieval-Augmented Generation (RAG) and chat agents that rely on precise and contextually relevant information retrieval. The extension integrates seamlessly with Postgres and provides a hybrid search approach that combines the conceptual similarity of vector search with the precision of keyword matching, enhancing the performance and relevance of search results for AI applications. The preview release focuses on a memtable layer for fast in-memory operations, with future plans to incorporate disk-based segments and advanced query optimizations.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Vector Search | 19 | 1,589 | 336 | 137 | +6% |
| RAG | 5 | 1,087 | 221 | 90 | +8% |
| LLM | 3 | 4,863 | 783 | 205 | +34% |
| MCP | 3 | 4,861 | 352 | 133 | +57% |
| Real-time | 3 | 6,551 | 1,245 | 236 | +61% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.