hsearch
hsearch · Tantivy-backed BM25 index access method with WAL-logged storage.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101889 | hsearch | hsearch | 0.4.1 | FTS | AGPL-3.0-only | Rust |
PostgreSQL · 18
Usage
Sources:
hsearch provides a Tantivy-backed bm25 index access method for PostgreSQL 18 while storing index bytes in PostgreSQL pages protected by generic WAL.
Enablement
Install hsearch 0.4.1 for PostgreSQL 18, add it to shared_preload_libraries, and restart before creating the extension:
The extension is non-relocatable and superuser-only. Its SQL objects live in the hyper schema.
Build and Query an Index
The first indexed column is the stable key named by key_field; other indexed expressions are searchable text fields.
&&& requires all generated ngrams and rechecks heap visibility. Rows inserted in the current transaction become searchable at commit.
Operations and Limits
The index is WAL-logged for crash recovery and physical replication, but it remains a derived structure: use REINDEX or hyper.reindex_all() after corruption or when operational policy calls for rebuilding. hsearch.max_matches caps candidates per scan key (default 1,000); increasing it improves deep filtered recall at higher memory and latency cost. Unlogged tables and tokenizer settings other than (2,5,'ascii_folding=true') are not supported in 0.4.1.