pg_search
pg_search
Full text search for PostgreSQL using BM25
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2100 | pg_search | pg_search | 0.19.3 | FTS | AGPL-3.0 | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-dt- | No | Yes | No | Yes | no | yes |
| Relationships | |
|---|---|
| See Also | pgroonga pgroonga_database pg_bestmatch vchord_bm25 pg_bigm zhparser pg_tokenizer pg_trgm |
PG 17+ does not require dynamic loading, build by ParadeDB team
Packages
| Type | Repo | Version | PG Major Availability | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EL | PIGSTY | 0.19.2 | 18 17 16 15 14 13 | pg_search_$v | - |
| Debian | PIGSTY | 0.19.2 | 18 17 16 15 14 13 | postgresql-$v-pg-search | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 | PG13 |
|---|---|---|---|---|---|---|
el8.x86_64 | MISS | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | MISS |
el8.aarch64 | MISS | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | MISS |
el9.x86_64 | MISS | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | MISS |
el9.aarch64 | MISS | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | PIGSTY 0.19.3 | MISS |
el10.x86_64 | MISS | MISS | MISS | MISS | MISS | MISS |
el10.aarch64 | MISS | MISS | MISS | MISS | MISS | MISS |
d12.x86_64 | MISS | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | MISS |
d12.aarch64 | MISS | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | MISS |
d13.x86_64 | MISS | MISS | MISS | MISS | MISS | MISS |
d13.aarch64 | MISS | MISS | MISS | MISS | MISS | MISS |
u22.x86_64 | MISS | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | MISS |
u22.aarch64 | MISS | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | MISS |
u24.x86_64 | MISS | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | MISS |
u24.aarch64 | MISS | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | PIGSTY 0.19.4 | MISS |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pg_search_17 | 0.19.3 | el8.x86_64 | pigsty | 46.1 MiB | pg_search_17-0.19.3-1PARADEDB.el8.x86_64.rpm |
pg_search_17 | 0.19.3 | el8.aarch64 | pigsty | 45.5 MiB | pg_search_17-0.19.3-1PARADEDB.el8.aarch64.rpm |
pg_search_17 | 0.19.3 | el9.x86_64 | pigsty | 45.9 MiB | pg_search_17-0.19.3-1PARADEDB.el9.x86_64.rpm |
pg_search_17 | 0.19.3 | el9.aarch64 | pigsty | 45.8 MiB | pg_search_17-0.19.3-1PARADEDB.el9.aarch64.rpm |
postgresql-17-pg-search | 0.19.4 | d12.x86_64 | pigsty | 45.4 MiB | postgresql-17-pg-search_0.19.4_amd64.deb |
postgresql-17-pg-search | 0.19.4 | d12.aarch64 | pigsty | 44.9 MiB | postgresql-17-pg-search_0.19.4_arm64.deb |
postgresql-17-pg-search | 0.19.4 | u22.x86_64 | pigsty | 45.4 MiB | postgresql-17-pg-search_0.19.4_amd64.deb |
postgresql-17-pg-search | 0.19.4 | u22.aarch64 | pigsty | 44.9 MiB | postgresql-17-pg-search_0.19.4_arm64.deb |
postgresql-17-pg-search | 0.19.4 | u24.x86_64 | pigsty | 45.4 MiB | postgresql-17-pg-search_0.19.4_amd64.deb |
postgresql-17-pg-search | 0.19.4 | u24.aarch64 | pigsty | 44.9 MiB | postgresql-17-pg-search_0.19.4_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pg_search_16 | 0.19.3 | el8.x86_64 | pigsty | 46.1 MiB | pg_search_16-0.19.3-1PARADEDB.el8.x86_64.rpm |
pg_search_16 | 0.19.3 | el8.aarch64 | pigsty | 45.5 MiB | pg_search_16-0.19.3-1PARADEDB.el8.aarch64.rpm |
pg_search_16 | 0.19.3 | el9.x86_64 | pigsty | 45.9 MiB | pg_search_16-0.19.3-1PARADEDB.el9.x86_64.rpm |
pg_search_16 | 0.19.3 | el9.aarch64 | pigsty | 45.8 MiB | pg_search_16-0.19.3-1PARADEDB.el9.aarch64.rpm |
postgresql-16-pg-search | 0.19.4 | d12.x86_64 | pigsty | 45.4 MiB | postgresql-16-pg-search_0.19.4_amd64.deb |
postgresql-16-pg-search | 0.19.4 | d12.aarch64 | pigsty | 44.9 MiB | postgresql-16-pg-search_0.19.4_arm64.deb |
postgresql-16-pg-search | 0.19.4 | u22.x86_64 | pigsty | 45.4 MiB | postgresql-16-pg-search_0.19.4_amd64.deb |
postgresql-16-pg-search | 0.19.4 | u22.aarch64 | pigsty | 44.9 MiB | postgresql-16-pg-search_0.19.4_arm64.deb |
postgresql-16-pg-search | 0.19.4 | u24.x86_64 | pigsty | 45.4 MiB | postgresql-16-pg-search_0.19.4_amd64.deb |
postgresql-16-pg-search | 0.19.4 | u24.aarch64 | pigsty | 44.9 MiB | postgresql-16-pg-search_0.19.4_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pg_search_15 | 0.19.3 | el8.x86_64 | pigsty | 46.1 MiB | pg_search_15-0.19.3-1PARADEDB.el8.x86_64.rpm |
pg_search_15 | 0.19.3 | el8.aarch64 | pigsty | 45.5 MiB | pg_search_15-0.19.3-1PARADEDB.el8.aarch64.rpm |
pg_search_15 | 0.19.3 | el9.x86_64 | pigsty | 45.9 MiB | pg_search_15-0.19.3-1PARADEDB.el9.x86_64.rpm |
pg_search_15 | 0.19.3 | el9.aarch64 | pigsty | 45.8 MiB | pg_search_15-0.19.3-1PARADEDB.el9.aarch64.rpm |
postgresql-15-pg-search | 0.19.4 | d12.x86_64 | pigsty | 45.4 MiB | postgresql-15-pg-search_0.19.4_amd64.deb |
postgresql-15-pg-search | 0.19.4 | d12.aarch64 | pigsty | 44.8 MiB | postgresql-15-pg-search_0.19.4_arm64.deb |
postgresql-15-pg-search | 0.19.4 | u22.x86_64 | pigsty | 45.4 MiB | postgresql-15-pg-search_0.19.4_amd64.deb |
postgresql-15-pg-search | 0.19.4 | u22.aarch64 | pigsty | 44.8 MiB | postgresql-15-pg-search_0.19.4_arm64.deb |
postgresql-15-pg-search | 0.19.4 | u24.x86_64 | pigsty | 45.4 MiB | postgresql-15-pg-search_0.19.4_amd64.deb |
postgresql-15-pg-search | 0.19.4 | u24.aarch64 | pigsty | 44.8 MiB | postgresql-15-pg-search_0.19.4_arm64.deb |
| Package | Version | OS | ORG | SIZE | File URL |
|---|---|---|---|---|---|
pg_search_14 | 0.19.3 | el8.x86_64 | pigsty | 46.1 MiB | pg_search_14-0.19.3-1PARADEDB.el8.x86_64.rpm |
pg_search_14 | 0.19.3 | el8.aarch64 | pigsty | 45.5 MiB | pg_search_14-0.19.3-1PARADEDB.el8.aarch64.rpm |
pg_search_14 | 0.19.3 | el9.x86_64 | pigsty | 45.9 MiB | pg_search_14-0.19.3-1PARADEDB.el9.x86_64.rpm |
pg_search_14 | 0.19.3 | el9.aarch64 | pigsty | 45.8 MiB | pg_search_14-0.19.3-1PARADEDB.el9.aarch64.rpm |
postgresql-14-pg-search | 0.19.4 | d12.x86_64 | pigsty | 45.4 MiB | postgresql-14-pg-search_0.19.4_amd64.deb |
postgresql-14-pg-search | 0.19.4 | d12.aarch64 | pigsty | 44.9 MiB | postgresql-14-pg-search_0.19.4_arm64.deb |
postgresql-14-pg-search | 0.19.4 | u22.x86_64 | pigsty | 45.4 MiB | postgresql-14-pg-search_0.19.4_amd64.deb |
postgresql-14-pg-search | 0.19.4 | u22.aarch64 | pigsty | 44.8 MiB | postgresql-14-pg-search_0.19.4_arm64.deb |
postgresql-14-pg-search | 0.19.4 | u24.x86_64 | pigsty | 45.4 MiB | postgresql-14-pg-search_0.19.4_amd64.deb |
postgresql-14-pg-search | 0.19.4 | u24.aarch64 | pigsty | 44.8 MiB | postgresql-14-pg-search_0.19.4_arm64.deb |
Source
Install
To add the required PGDG / PIGSTY upstream repository, use:
pig repo add pgsql -u # add PGDG + Pigsty repo and update cache (leave existing repos)Install this extension with:
pig ext install pg_search; # install by extension name, for the current active PG version
pig ext install pg_search; # install via package alias, for the active PG version
pig ext install pg_search -v 17; # install for PG 17
pig ext install pg_search -v 16; # install for PG 16
pig ext install pg_search -v 15; # install for PG 15
pig ext install pg_search -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pg_search CASCADE SCHEMA paradedb;Caveat
pg_search 0.15.19+ RPMs are broken due to libicu version issue
The version is locked to 0.15.18 on EL platforms until the issue is resolved.
Usage
https://docs.paradedb.com/documentation/getting-started/quickstart
CREATE EXTENSION pg_search;
ALTER SYSTEM SET paradedb.pg_search_telemetry TO 'off';
CALL paradedb.create_bm25_test_table(
schema_name => 'public',
table_name => 'mock_items'
);
SELECT description, rating, category FROM mock_items LIMIT 3;
CALL paradedb.create_bm25(
index_name => 'search_idx',
schema_name => 'public',
table_name => 'mock_items',
key_field => 'id',
text_fields => paradedb.field('description', tokenizer => paradedb.tokenizer('en_stem')) ||
paradedb.field('category'),
numeric_fields => paradedb.field('rating')
);
SELECT description, rating, category
FROM search_idx.search('(description:keyboard OR category:electronics) AND rating:>2',limit_rows => 5);
CALL paradedb.create_bm25(
index_name => 'ngrams_idx',
schema_name => 'public',
table_name => 'mock_items',
key_field => 'id',
text_fields => paradedb.field('description', tokenizer => paradedb.tokenizer('ngram', min_gram => 4, max_gram => 4, prefix_only => false)) ||
paradedb.field('category')
);
SELECT description, rating, category
FROM ngrams_idx.search('description:blue');Last updated on