pg_kazsearch
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_kazsearch | 2.3.0 | FTS | LGPL-3.0 | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2200 | pg_kazsearch | No | Yes | No | Yes | No | No | - |
| Related | pgroonga pg_tokenizer unaccent dict_xsyn hunspell_cs_cz dict_int pg_jieba pg_cjk_parser zhparser pg_bigm |
|---|
Upstream 2.3.0 uses pgrx 0.17.0; PIGSTY packaging builds with pgrx 0.19.1 for PostgreSQL 16 through 18.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.3.0 | 1817161514 | pg_kazsearch | - |
| RPM | PIGSTY | 2.3.0 | 1817161514 | pg_kazsearch_$v | - |
| DEB | PIGSTY | 2.3.0 | 1817161514 | postgresql-$v-pg-kazsearch | - |
Build
You can build the RPM / DEB packages for pg_kazsearch using pig build:
Install
You can install pg_kazsearch directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
pg_kazsearch provides Kazakh full-text stemming for PostgreSQL 16 through 18. It installs a ready-to-use kazakh_cfg configuration and pg_kazsearch_dict dictionary. Cyrillic and supported modern Latin-script Kazakh converge to canonical Cyrillic stems so documents and queries can match across scripts.
Core Workflow
Add a weighted stored vector and GIN index:
Dictionary Tuning
Penalty weights can be changed at runtime:
The default script_mode = auto detects supported modern Kazakh Latin orthography and returns Cyrillic stems. Disable Latin handling when strict Cyrillic-only behavior is required:
Upgrade and Search Caveats
- Stemmer upgrades change index terms. After upgrading to
2.3.0, recompute storedtsvectorcolumns or repopulate trigger-maintained vectors, thenVACUUM (ANALYZE)the table.
- Long-lived sessions opened before an upgrade should reconnect so they load the new dictionary.
- Latin support targets the modern orthography. Mixed-script input, legacy apostrophe/acute/digraph spellings, and low-confidence ASCII tokens may remain unchanged.
websearch_to_tsqueryuses strict AND semantics for ordinary terms. Applications that need broader recall should deliberately implement and measure a fallback query rather than silently changing all searches to OR.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)