pg_kazsearch

pg_kazsearch

pg_kazsearch : Kazakh full-text search extension for PostgreSQL

Overview

ID Extension Package Version Category License Language
2200
pg_kazsearch
pg_kazsearch
0.1.0
FTS
LGPL-3.0
Rust
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d--
No
Yes
No
Yes
no
no

Upstream release/package version is 2.0.0; extension control version is 0.1.0.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
0.1.0
18
17
16
15
14
pg_kazsearch -
RPM
PIGSTY
2.0.0
18
17
16
15
14
pg_kazsearch_$v -
DEB
PIGSTY
2.0.0
18
17
16
15
14
postgresql-$v-pg-kazsearch -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
el8.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
el9.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
el9.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
el10.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
el10.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
d12.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
d12.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
d13.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
d13.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
u22.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
u22.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
u24.x86_64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
u24.aarch64
PIGSTY 2.0.0
PIGSTY 2.0.0
PIGSTY 2.0.0
MISS
MISS
Package Version OS ORG SIZE File URL
pg_kazsearch_18 2.0.0 el8.x86_64 pigsty 443.6 KiB pg_kazsearch_18-2.0.0-1PIGSTY.el8.x86_64.rpm
pg_kazsearch_18 2.0.0 el8.aarch64 pigsty 321.3 KiB pg_kazsearch_18-2.0.0-1PIGSTY.el8.aarch64.rpm
pg_kazsearch_18 2.0.0 el9.x86_64 pigsty 456.3 KiB pg_kazsearch_18-2.0.0-1PIGSTY.el9.x86_64.rpm
pg_kazsearch_18 2.0.0 el9.aarch64 pigsty 331.2 KiB pg_kazsearch_18-2.0.0-1PIGSTY.el9.aarch64.rpm
pg_kazsearch_18 2.0.0 el10.x86_64 pigsty 456.1 KiB pg_kazsearch_18-2.0.0-1PIGSTY.el10.x86_64.rpm
pg_kazsearch_18 2.0.0 el10.aarch64 pigsty 331.3 KiB pg_kazsearch_18-2.0.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-pg-kazsearch 2.0.0 d12.x86_64 pigsty 361.3 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~bookworm_amd64.deb
postgresql-18-pg-kazsearch 2.0.0 d12.aarch64 pigsty 251.2 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~bookworm_arm64.deb
postgresql-18-pg-kazsearch 2.0.0 d13.x86_64 pigsty 361.6 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~trixie_amd64.deb
postgresql-18-pg-kazsearch 2.0.0 d13.aarch64 pigsty 251.3 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~trixie_arm64.deb
postgresql-18-pg-kazsearch 2.0.0 u22.x86_64 pigsty 406.8 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~jammy_amd64.deb
postgresql-18-pg-kazsearch 2.0.0 u22.aarch64 pigsty 285.9 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~jammy_arm64.deb
postgresql-18-pg-kazsearch 2.0.0 u24.x86_64 pigsty 402.2 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~noble_amd64.deb
postgresql-18-pg-kazsearch 2.0.0 u24.aarch64 pigsty 284.0 KiB postgresql-18-pg-kazsearch_2.0.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pg_kazsearch_17 2.0.0 el8.x86_64 pigsty 443.2 KiB pg_kazsearch_17-2.0.0-1PIGSTY.el8.x86_64.rpm
pg_kazsearch_17 2.0.0 el8.aarch64 pigsty 321.4 KiB pg_kazsearch_17-2.0.0-1PIGSTY.el8.aarch64.rpm
pg_kazsearch_17 2.0.0 el9.x86_64 pigsty 456.4 KiB pg_kazsearch_17-2.0.0-1PIGSTY.el9.x86_64.rpm
pg_kazsearch_17 2.0.0 el9.aarch64 pigsty 331.3 KiB pg_kazsearch_17-2.0.0-1PIGSTY.el9.aarch64.rpm
pg_kazsearch_17 2.0.0 el10.x86_64 pigsty 456.7 KiB pg_kazsearch_17-2.0.0-1PIGSTY.el10.x86_64.rpm
pg_kazsearch_17 2.0.0 el10.aarch64 pigsty 331.3 KiB pg_kazsearch_17-2.0.0-1PIGSTY.el10.aarch64.rpm
postgresql-17-pg-kazsearch 2.0.0 d12.x86_64 pigsty 361.5 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~bookworm_amd64.deb
postgresql-17-pg-kazsearch 2.0.0 d12.aarch64 pigsty 251.2 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~bookworm_arm64.deb
postgresql-17-pg-kazsearch 2.0.0 d13.x86_64 pigsty 361.5 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~trixie_amd64.deb
postgresql-17-pg-kazsearch 2.0.0 d13.aarch64 pigsty 251.0 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~trixie_arm64.deb
postgresql-17-pg-kazsearch 2.0.0 u22.x86_64 pigsty 406.8 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~jammy_amd64.deb
postgresql-17-pg-kazsearch 2.0.0 u22.aarch64 pigsty 286.3 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~jammy_arm64.deb
postgresql-17-pg-kazsearch 2.0.0 u24.x86_64 pigsty 401.9 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~noble_amd64.deb
postgresql-17-pg-kazsearch 2.0.0 u24.aarch64 pigsty 283.9 KiB postgresql-17-pg-kazsearch_2.0.0-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
pg_kazsearch_16 2.0.0 el8.x86_64 pigsty 443.4 KiB pg_kazsearch_16-2.0.0-1PIGSTY.el8.x86_64.rpm
pg_kazsearch_16 2.0.0 el8.aarch64 pigsty 321.5 KiB pg_kazsearch_16-2.0.0-1PIGSTY.el8.aarch64.rpm
pg_kazsearch_16 2.0.0 el9.x86_64 pigsty 456.4 KiB pg_kazsearch_16-2.0.0-1PIGSTY.el9.x86_64.rpm
pg_kazsearch_16 2.0.0 el9.aarch64 pigsty 331.4 KiB pg_kazsearch_16-2.0.0-1PIGSTY.el9.aarch64.rpm
pg_kazsearch_16 2.0.0 el10.x86_64 pigsty 456.2 KiB pg_kazsearch_16-2.0.0-1PIGSTY.el10.x86_64.rpm
pg_kazsearch_16 2.0.0 el10.aarch64 pigsty 331.2 KiB pg_kazsearch_16-2.0.0-1PIGSTY.el10.aarch64.rpm
postgresql-16-pg-kazsearch 2.0.0 d12.x86_64 pigsty 361.5 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~bookworm_amd64.deb
postgresql-16-pg-kazsearch 2.0.0 d12.aarch64 pigsty 251.2 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~bookworm_arm64.deb
postgresql-16-pg-kazsearch 2.0.0 d13.x86_64 pigsty 361.2 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~trixie_amd64.deb
postgresql-16-pg-kazsearch 2.0.0 d13.aarch64 pigsty 251.2 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~trixie_arm64.deb
postgresql-16-pg-kazsearch 2.0.0 u22.x86_64 pigsty 406.9 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~jammy_amd64.deb
postgresql-16-pg-kazsearch 2.0.0 u22.aarch64 pigsty 286.2 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~jammy_arm64.deb
postgresql-16-pg-kazsearch 2.0.0 u24.x86_64 pigsty 402.0 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~noble_amd64.deb
postgresql-16-pg-kazsearch 2.0.0 u24.aarch64 pigsty 283.6 KiB postgresql-16-pg-kazsearch_2.0.0-1PIGSTY~noble_arm64.deb

Source

pig build pkg pg_kazsearch;		# 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 pg_kazsearch;		# install via package name, for the active PG version

pig install pg_kazsearch -v 18;   # install for PG 18
pig install pg_kazsearch -v 17;   # install for PG 17
pig install pg_kazsearch -v 16;   # install for PG 16

Create this extension with:

CREATE EXTENSION pg_kazsearch;

Usage

Sources: README and project repo.

pg_kazsearch is a PostgreSQL full-text search extension for the Kazakh language. The upstream README describes it as a Rust extension built with pgrx that plugs into PostgreSQL’s text search pipeline.

It creates a ready-to-use configuration named kazakh_cfg and the supporting dictionary pg_kazsearch_dict.

Quick Start

CREATE EXTENSION pg_kazsearch;

SELECT to_tsvector('kazakh_cfg', 'президенттің жарлығы');
-- 'жарлық':2 'президент':1

SELECT ts_lexize('pg_kazsearch_dict', 'алмаларымыздағы');
-- {алма}

Use Cases

The README shows the extension being used for:

  • stemming individual Kazakh words
  • building tsvector values with to_tsvector('kazakh_cfg', ...)
  • adding generated tsvector columns to a table
  • indexing those columns with GIN
  • searching with websearch_to_tsquery('kazakh_cfg', ...)

Example table workflow:

ALTER TABLE articles ADD COLUMN fts tsvector
    GENERATED ALWAYS AS (
        setweight(to_tsvector('kazakh_cfg', title), 'A') ||
        setweight(to_tsvector('kazakh_cfg', body), 'B')
    ) STORED;

CREATE INDEX idx_fts ON articles USING GIN (fts);

SELECT title FROM articles
WHERE fts @@ websearch_to_tsquery('kazakh_cfg', 'президенттің жарлығы')
ORDER BY ts_rank_cd(fts, websearch_to_tsquery('kazakh_cfg', 'президенттің жарлығы')) DESC
LIMIT 10;

Tuning

Penalty weights are adjustable at runtime:

ALTER TEXT SEARCH DICTIONARY pg_kazsearch_dict (w_deriv = 3.5, w_short_char = 100.0);

Deployment

The README documents three supported paths:

  • pre-built Debian/Ubuntu packages
  • a Docker image based on ghcr.io/darkhanakh/pg-kazsearch
  • source builds with cargo pgrx install

The repository metadata in this project matches PostgreSQL 16-18.

Last updated on