# timescale/pg_textsearch

PostgreSQL extension for BM25 relevance-ranked full-text search. Postgres OSS licensed.

Repository: https://github.com/timescale/pg_textsearch
Canonical: https://ross.abutalabs.com/products/pg_textsearch
Language: C
License: PostgreSQL
License Family: other
Topics: bm25, c-extension, full-text-search, postgresql
Last push: 2026-08-26T07:58:27+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 98, longevity 30
- inputs: {"age_days": 423, "days_push": 7, "days_rel": 15, "gap_med": 14, "n_releases_24m": 18}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3941, forks 114 (observed 2026-08-28T04:08:30.120595+00:00)

## What it is
A PostgreSQL extension written in C that adds BM25 relevance-ranked full-text search via a bm25 index type and the <@> ordering operator. It supports expression and partial indexes, partitioned tables, parallel index builds, and Block-Max WAND top-k optimization.

## Use cases
- rank full-text search results by BM25 relevance in Postgres
- fast top-k keyword search over large document tables
- search over JSONB fields and multiple columns
- build multilingual search with Postgres text search configurations
- scoped search using partial indexes on partitioned tables

## When to choose
- you need relevance-ranked (BM25) search inside PostgreSQL without an external engine
- you want simple SQL syntax like ORDER BY content <@> 'terms'
- you need high-performance top-k queries on large text tables
- you are on PostgreSQL 17 or 18

## When to avoid
- you need fuzzy/typo-tolerant or vector similarity search
- you are on PostgreSQL versions older than 17
- you need a hosted search service with analytics and dashboards
- you cannot modify shared_preload_libraries on your database server

## Facets
- artifact type: library
- maturity: active
- function: search-engine, database
- domain: databases, developer-tools
- platform: self-hosted
- tags: postgresql-extension, bm25, full-text-search, c-extension, top-k-queries, search, linux, macos

## Member repositories
- timescale/pg_textsearch (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:30.120595+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:24:37.557748+00:00, confidence not recorded.
  - readme: https://github.com/timescale/pg_textsearch (fetched 2026-08-28T04:08:30.120595+00:00, sha 1d2afb0d9f0b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
