Installation
Current source targets 0.4.0 (unreleased), with native tsvector and a new index format. Examples labeled 0.3.x use the historical bm25vector API. In-place upgrades are blocked; read the 0.4.0 migration guide before changing binaries.
vchord_bm25 supports PostgreSQL 14, 15, 16, 17, and 18 on Linux (x86_64 and aarch64) and macOS.
Method 1: Pigsty / Native OS Packages (Recommended)
Pigsty provides pre-built native RPM and DEB packages for vchord, vchord_bm25, and pg_tokenizer across EL 8/9/10, Debian 12/13, and Ubuntu 22.04/24.04 for PostgreSQL 14–18.
Or install directly via apt / dnf once the Pigsty repository is configured:
Method 2: Docker (tensorchord/vchord-suite)
The official tensorchord/vchord-suite Docker image bundles PostgreSQL, VectorChord (vchord), VectorChord-BM25 (vchord_bm25), and pg_tokenizer out of the box:
You can also pull from GitHub Container Registry using ghcr.io/tensorchord/vchord-suite:pg18-latest (or pg17-latest, pg16-latest, pg15-latest, pg14-latest).
Connect with psql:
Method 3: GitHub Release Packages (.deb & RHEL .zip)
Download prebuilt .deb or RHEL 9+ .zip packages for your PostgreSQL major version (14–18) and CPU architecture (amd64 / x86_64 or arm64 / aarch64) from the GitHub Releases pages of pgsty/vchord_bm25 (upstream supervc-stack/VectorChord-bm25) and pgsty/pg_tokenizer (upstream supervc-stack/pg_tokenizer.rs):
Debian / Ubuntu (.deb)
RHEL 9+ / Enterprise Linux (.zip Archive)
For RHEL 9+ systems when installing manually from the release .zip archive (requires glibc >= 2.34):
Method 4: Build from Source
To compile pgsty/vchord_bm25 from source:
Optional Lindera Dictionaries at Compile Time: To embed Lindera CJK morphological dictionaries (ipadic, ipadic-neologd, unidic, ko-dic, cc-cedict) directly into pg_tokenizer.so, pass the --features flag when compiling pg_tokenizer:
Development & Debugging
Use the dev profile for an optimized BM25 build with debug symbols:
Restart a disposable PostgreSQL instance configured to preload vchord_bm25, then connect with psql. To attach a debugger, obtain that session’s backend PID:
Configure PostgreSQL & Enable Extensions
1. Shared Preload Libraries (Required for 0.4.0)
Current source requires vchord_bm25 in shared_preload_libraries. Preserve other required libraries. pg_tokenizer is optional for the native to_tsvector workflow:
Restart PostgreSQL after modifying shared_preload_libraries.
2. Create Extensions and Set search_path
Connect to your target database and enable the extensions:
In v0.1.0–v0.3.0, vchord_bm25 installs its objects into the bm25_catalog schema and pg_tokenizer installs into tokenizer_catalog. Add both schemas to your search_path:
Verify the installed version: