Skip to content

stannum

Experimental TINQL text search with BM25 and segmented indexes

stannum : Experimental TINQL text search with BM25 and segmented indexes

Overview

ID Extension Package Version Category License Language
2320 stannum stannum 0.1.0 FTS AGPL-3.0-or-later Rust
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-- No Yes No Yes no no
Relationships
Schemas stannum
See Also tin pg_search
Unreleased 0.1.0-dev snapshot; no version release/tag. Conflicts with tin in the same database. Optional preload enables maintenance workers and standby index reads; preload must match on primary and standbys.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 0.1.0 18 17 16 15 14 stannum -
RPM PIGSTY 0.1.0 18 17 16 15 14 stannum_$v -
DEB PIGSTY 0.1.0 18 17 16 15 14 postgresql-$v-stannum -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
el8.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
el9.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
el9.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
el10.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
el10.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
d12.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
d12.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
d13.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
d13.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
u22.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
u22.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
u24.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
u24.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
u26.x86_64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
u26.aarch64 PIGSTY 0.1.0 PIGSTY 0.1.0 N/A N/A N/A
Package Version OS ORG SIZE File URL
stannum_18 0.1.0 el8.x86_64 pigsty 3.5 MiB stannum_18-0.1.0-1PGSTY.el8.x86_64.rpm
stannum_18 0.1.0 el8.aarch64 pigsty 3.1 MiB stannum_18-0.1.0-1PGSTY.el8.aarch64.rpm
stannum_18 0.1.0 el9.x86_64 pigsty 3.5 MiB stannum_18-0.1.0-1PGSTY.el9.x86_64.rpm
stannum_18 0.1.0 el9.aarch64 pigsty 3.3 MiB stannum_18-0.1.0-1PGSTY.el9.aarch64.rpm
stannum_18 0.1.0 el10.x86_64 pigsty 3.5 MiB stannum_18-0.1.0-1PGSTY.el10.x86_64.rpm
stannum_18 0.1.0 el10.aarch64 pigsty 3.3 MiB stannum_18-0.1.0-1PGSTY.el10.aarch64.rpm
postgresql-18-stannum 0.1.0 d12.x86_64 pigsty 2.9 MiB postgresql-18-stannum_0.1.0-1PGSTY~bookworm_amd64.deb
postgresql-18-stannum 0.1.0 d12.aarch64 pigsty 2.5 MiB postgresql-18-stannum_0.1.0-1PGSTY~bookworm_arm64.deb
postgresql-18-stannum 0.1.0 d13.x86_64 pigsty 3.0 MiB postgresql-18-stannum_0.1.0-1PGSTY~trixie_amd64.deb
postgresql-18-stannum 0.1.0 d13.aarch64 pigsty 2.5 MiB postgresql-18-stannum_0.1.0-1PGSTY~trixie_arm64.deb
postgresql-18-stannum 0.1.0 u22.x86_64 pigsty 3.3 MiB postgresql-18-stannum_0.1.0-1PGSTY~jammy_amd64.deb
postgresql-18-stannum 0.1.0 u22.aarch64 pigsty 3.0 MiB postgresql-18-stannum_0.1.0-1PGSTY~jammy_arm64.deb
postgresql-18-stannum 0.1.0 u24.x86_64 pigsty 3.2 MiB postgresql-18-stannum_0.1.0-1PGSTY~noble_amd64.deb
postgresql-18-stannum 0.1.0 u24.aarch64 pigsty 3.0 MiB postgresql-18-stannum_0.1.0-1PGSTY~noble_arm64.deb
postgresql-18-stannum 0.1.0 u26.x86_64 pigsty 3.2 MiB postgresql-18-stannum_0.1.0-1PGSTY~resolute_amd64.deb
postgresql-18-stannum 0.1.0 u26.aarch64 pigsty 3.0 MiB postgresql-18-stannum_0.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
stannum_17 0.1.0 el8.x86_64 pigsty 3.5 MiB stannum_17-0.1.0-1PGSTY.el8.x86_64.rpm
stannum_17 0.1.0 el8.aarch64 pigsty 3.1 MiB stannum_17-0.1.0-1PGSTY.el8.aarch64.rpm
stannum_17 0.1.0 el9.x86_64 pigsty 3.5 MiB stannum_17-0.1.0-1PGSTY.el9.x86_64.rpm
stannum_17 0.1.0 el9.aarch64 pigsty 3.3 MiB stannum_17-0.1.0-1PGSTY.el9.aarch64.rpm
stannum_17 0.1.0 el10.x86_64 pigsty 3.5 MiB stannum_17-0.1.0-1PGSTY.el10.x86_64.rpm
stannum_17 0.1.0 el10.aarch64 pigsty 3.2 MiB stannum_17-0.1.0-1PGSTY.el10.aarch64.rpm
postgresql-17-stannum 0.1.0 d12.x86_64 pigsty 3.0 MiB postgresql-17-stannum_0.1.0-1PGSTY~bookworm_amd64.deb
postgresql-17-stannum 0.1.0 d12.aarch64 pigsty 2.5 MiB postgresql-17-stannum_0.1.0-1PGSTY~bookworm_arm64.deb
postgresql-17-stannum 0.1.0 d13.x86_64 pigsty 3.0 MiB postgresql-17-stannum_0.1.0-1PGSTY~trixie_amd64.deb
postgresql-17-stannum 0.1.0 d13.aarch64 pigsty 2.5 MiB postgresql-17-stannum_0.1.0-1PGSTY~trixie_arm64.deb
postgresql-17-stannum 0.1.0 u22.x86_64 pigsty 3.3 MiB postgresql-17-stannum_0.1.0-1PGSTY~jammy_amd64.deb
postgresql-17-stannum 0.1.0 u22.aarch64 pigsty 3.0 MiB postgresql-17-stannum_0.1.0-1PGSTY~jammy_arm64.deb
postgresql-17-stannum 0.1.0 u24.x86_64 pigsty 3.3 MiB postgresql-17-stannum_0.1.0-1PGSTY~noble_amd64.deb
postgresql-17-stannum 0.1.0 u24.aarch64 pigsty 3.0 MiB postgresql-17-stannum_0.1.0-1PGSTY~noble_arm64.deb
postgresql-17-stannum 0.1.0 u26.x86_64 pigsty 3.2 MiB postgresql-17-stannum_0.1.0-1PGSTY~resolute_amd64.deb
postgresql-17-stannum 0.1.0 u26.aarch64 pigsty 3.0 MiB postgresql-17-stannum_0.1.0-1PGSTY~resolute_arm64.deb

Source

pig build pkg stannum;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install stannum;		# install via package name, for the active PG version

pig install stannum -v 18;   # install for PG 18
pig install stannum -v 17;   # install for PG 17

Create this extension with:

CREATE EXTENSION stannum;

Usage

Sources:

stannum is an experimental text-search extension derived from Lead, with persistent indexes, Boolean and phrase queries, and BM25 scoring. The reviewed 0.1.0 source has its own extension identity and storage format.

Core Workflow

CREATE EXTENSION stannum;
CREATE TABLE documents (id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, body text);
INSERT INTO documents (body) VALUES
  ('PostgreSQL supports full text search'), ('Search with exact phrase matching');
CREATE INDEX documents_search ON documents USING stannum (body);
ANALYZE documents;
SELECT id, stannum.full_score(ctid) AS score
FROM documents WHERE body ==> 'search' ORDER BY score DESC LIMIT 10;
SELECT * FROM stannum.segment_info('documents_search');
SELECT * FROM stannum.verify_index('documents_search', heap_check => true);

Operation and Compatibility

The ==> operator accepts TINQL. stannum.highlight marks matching text; stannum.segment_info inspects index segments and stannum.verify_index checks their consistency, optionally against the heap. Index maintenance follows PostgreSQL writes and vacuum.

PostgreSQL 17 and 18 are build targets, with most current lifecycle evidence on 18. A superuser installs the extension in its fixed stannum schema. Primary-server use loads on demand. For standby index reads, add the library to shared_preload_libraries on both primary and standbys and restart those servers.

Migration Boundary

Do not install tin and stannum in the same database: their global ==> operator conflicts. There is no supported in-place migration from the earlier extension names or storage layouts. Treat this as experimental software and validate recovery and maintenance on the intended workload.