跳转到主要内容

pg_textsearch

带有BM25排序的全文搜索扩展

pg_textsearch · 带有BM25排序的全文搜索扩展

概览

ID扩展软件包版本类别许可证编程语言
2190pg_textsearchpg_textsearch1.6.0FTSPostgreSQLC
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--sLd--否是是是否否
bm25 conflicts with pg_search/vchord_bm25; optional compaction needs pg_durable>=0.2.8; PG19 experimental.

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTMIXED1.6.019 18 17 16 15pg_textsearch-
RPMPGDG1.6.019 18 17 16 15pg_textsearch_$v-
DEBPIGSTY1.6.019 18 17 16 15postgresql-$v-textsearch-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APGDG 1.6.0PGDG 1.6.0N/AN/A
el8.aarch64N/APGDG 1.6.0PGDG 1.6.0N/AN/A
el9.x86_64PGDG 1.6.0PGDG 1.6.0PGDG 1.6.0N/AN/A
el9.aarch64PGDG 1.6.0PGDG 1.6.0PGDG 1.6.0N/AN/A
el10.x86_64PGDG 1.6.0PGDG 1.6.0PGDG 1.6.0N/AN/A
el10.aarch64PGDG 1.6.0PGDG 1.6.0PGDG 1.6.0N/AN/A
d12.x86_64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
d12.aarch64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
d13.x86_64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
d13.aarch64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
u22.x86_64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
u22.aarch64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
u24.x86_64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
u24.aarch64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
u26.x86_64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
u26.aarch64PIGSTY 1.6.0PIGSTY 1.6.0PIGSTY 1.6.0N/AN/A
软件包版本平台仓库大小下载
pg_textsearch_191.6.0el9.x86_64pgdg217.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel9.9.x86_64.rpm
pg_textsearch_191.6.0el9.x86_64pgdg217.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_191.6.0el9.x86_64pgdg217.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_191.5.1el9.x86_64pigsty2.0 MiBpg_textsearch_19-1.5.1-1PGSTY.el9.x86_64.rpm
pg_textsearch_191.6.0el9.aarch64pgdg206.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel9.9.aarch64.rpm
pg_textsearch_191.6.0el9.aarch64pgdg206.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_191.6.0el9.aarch64pgdg206.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_191.5.1el9.aarch64pigsty2.0 MiBpg_textsearch_19-1.5.1-1PGSTY.el9.aarch64.rpm
pg_textsearch_191.6.0el10.x86_64pgdg224.3 KiBpg_textsearch_19-1.6.0-1PGDG.rhel10.3.x86_64.rpm
pg_textsearch_191.6.0el10.x86_64pgdg224.4 KiBpg_textsearch_19-1.6.0-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_191.6.0el10.x86_64pgdg224.4 KiBpg_textsearch_19-1.6.0-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_191.5.1el10.x86_64pigsty2.0 MiBpg_textsearch_19-1.5.1-1PGSTY.el10.x86_64.rpm
pg_textsearch_191.6.0el10.aarch64pgdg210.7 KiBpg_textsearch_19-1.6.0-1PGDG.rhel10.3.aarch64.rpm
pg_textsearch_191.6.0el10.aarch64pgdg210.9 KiBpg_textsearch_19-1.6.0-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_191.6.0el10.aarch64pgdg210.9 KiBpg_textsearch_19-1.6.0-1PGDG.rhel10.1.aarch64.rpm
pg_textsearch_191.5.1el10.aarch64pigsty1.9 MiBpg_textsearch_19-1.5.1-1PGSTY.el10.aarch64.rpm
postgresql-19-textsearch1.6.0d12.x86_64pigsty1.9 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~bookworm_amd64.deb
postgresql-19-textsearch1.6.0d12.aarch64pigsty1.9 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~bookworm_arm64.deb
postgresql-19-textsearch1.6.0d13.x86_64pigsty1.9 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~trixie_amd64.deb
postgresql-19-textsearch1.6.0d13.aarch64pigsty1.9 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~trixie_arm64.deb
postgresql-19-textsearch1.6.0u22.x86_64pigsty2.1 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~jammy_amd64.deb
postgresql-19-textsearch1.6.0u22.aarch64pigsty2.1 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~jammy_arm64.deb
postgresql-19-textsearch1.6.0u24.x86_64pigsty2.0 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~noble_amd64.deb
postgresql-19-textsearch1.6.0u24.aarch64pigsty2.0 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~noble_arm64.deb
postgresql-19-textsearch1.6.0u26.x86_64pigsty2.0 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~resolute_amd64.deb
postgresql-19-textsearch1.6.0u26.aarch64pigsty2.0 MiBpostgresql-19-textsearch_1.6.0-1PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
pg_textsearch_181.6.0el8.x86_64pgdg220.9 KiBpg_textsearch_18-1.6.0-1PGDG.rhel8.10.x86_64.rpm
pg_textsearch_181.5.1el8.x86_64pgdg210.5 KiBpg_textsearch_18-1.5.1-2PGDG.rhel8.10.x86_64.rpm
pg_textsearch_181.5.1el8.x86_64pgdg210.6 KiBpg_textsearch_18-1.5.1-1PGDG.rhel8.10.x86_64.rpm
pg_textsearch_181.4.0el8.x86_64pgdg129.5 KiBpg_textsearch_18-1.4.0-1PGDG.rhel8.10.x86_64.rpm
pg_textsearch_181.6.0el8.aarch64pgdg204.7 KiBpg_textsearch_18-1.6.0-1PGDG.rhel8.10.aarch64.rpm
pg_textsearch_181.5.1el8.aarch64pgdg194.9 KiBpg_textsearch_18-1.5.1-2PGDG.rhel8.10.aarch64.rpm
pg_textsearch_181.5.1el8.aarch64pgdg194.6 KiBpg_textsearch_18-1.5.1-1PGDG.rhel8.10.aarch64.rpm
pg_textsearch_181.4.0el8.aarch64pgdg122.5 KiBpg_textsearch_18-1.4.0-1PGDG.rhel8.10.aarch64.rpm
pg_textsearch_181.6.0el9.x86_64pgdg216.9 KiBpg_textsearch_18-1.6.0-1PGDG.rhel9.9.x86_64.rpm
pg_textsearch_181.6.0el9.x86_64pgdg216.9 KiBpg_textsearch_18-1.6.0-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_181.6.0el9.x86_64pgdg216.9 KiBpg_textsearch_18-1.6.0-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_181.5.1el9.x86_64pgdg206.7 KiBpg_textsearch_18-1.5.1-2PGDG.rhel9.9.x86_64.rpm
pg_textsearch_181.5.1el9.x86_64pgdg206.7 KiBpg_textsearch_18-1.5.1-2PGDG.rhel9.8.x86_64.rpm
pg_textsearch_181.5.1el9.x86_64pgdg206.8 KiBpg_textsearch_18-1.5.1-2PGDG.rhel9.7.x86_64.rpm
pg_textsearch_181.5.1el9.x86_64pgdg206.4 KiBpg_textsearch_18-1.5.1-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_181.5.1el9.x86_64pgdg206.4 KiBpg_textsearch_18-1.5.1-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_181.4.0el9.x86_64pgdg125.8 KiBpg_textsearch_18-1.4.0-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_181.4.0el9.x86_64pgdg125.7 KiBpg_textsearch_18-1.4.0-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_181.6.0el9.aarch64pgdg206.6 KiBpg_textsearch_18-1.6.0-1PGDG.rhel9.9.aarch64.rpm
pg_textsearch_181.6.0el9.aarch64pgdg206.6 KiBpg_textsearch_18-1.6.0-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_181.6.0el9.aarch64pgdg206.6 KiBpg_textsearch_18-1.6.0-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_181.5.1el9.aarch64pgdg196.4 KiBpg_textsearch_18-1.5.1-2PGDG.rhel9.9.aarch64.rpm
pg_textsearch_181.5.1el9.aarch64pgdg196.4 KiBpg_textsearch_18-1.5.1-2PGDG.rhel9.8.aarch64.rpm
pg_textsearch_181.5.1el9.aarch64pgdg196.5 KiBpg_textsearch_18-1.5.1-2PGDG.rhel9.7.aarch64.rpm
pg_textsearch_181.5.1el9.aarch64pgdg196.2 KiBpg_textsearch_18-1.5.1-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_181.5.1el9.aarch64pgdg196.2 KiBpg_textsearch_18-1.5.1-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_181.4.0el9.aarch64pgdg123.3 KiBpg_textsearch_18-1.4.0-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_181.4.0el9.aarch64pgdg123.3 KiBpg_textsearch_18-1.4.0-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_181.6.0el10.x86_64pgdg224.1 KiBpg_textsearch_18-1.6.0-1PGDG.rhel10.3.x86_64.rpm
pg_textsearch_181.6.0el10.x86_64pgdg224.3 KiBpg_textsearch_18-1.6.0-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_181.6.0el10.x86_64pgdg224.3 KiBpg_textsearch_18-1.6.0-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_181.5.1el10.x86_64pgdg213.0 KiBpg_textsearch_18-1.5.1-2PGDG.rhel10.3.x86_64.rpm
pg_textsearch_181.5.1el10.x86_64pgdg213.2 KiBpg_textsearch_18-1.5.1-2PGDG.rhel10.2.x86_64.rpm
pg_textsearch_181.5.1el10.x86_64pgdg213.2 KiBpg_textsearch_18-1.5.1-2PGDG.rhel10.1.x86_64.rpm
pg_textsearch_181.5.1el10.x86_64pgdg212.8 KiBpg_textsearch_18-1.5.1-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_181.5.1el10.x86_64pgdg212.8 KiBpg_textsearch_18-1.5.1-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_181.4.0el10.x86_64pgdg129.5 KiBpg_textsearch_18-1.4.0-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_181.4.0el10.x86_64pgdg129.5 KiBpg_textsearch_18-1.4.0-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_181.6.0el10.aarch64pgdg210.6 KiBpg_textsearch_18-1.6.0-1PGDG.rhel10.3.aarch64.rpm
pg_textsearch_181.6.0el10.aarch64pgdg210.8 KiBpg_textsearch_18-1.6.0-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_181.6.0el10.aarch64pgdg210.7 KiBpg_textsearch_18-1.6.0-1PGDG.rhel10.1.aarch64.rpm
pg_textsearch_181.5.1el10.aarch64pgdg200.2 KiBpg_textsearch_18-1.5.1-2PGDG.rhel10.3.aarch64.rpm
pg_textsearch_181.5.1el10.aarch64pgdg200.3 KiBpg_textsearch_18-1.5.1-2PGDG.rhel10.2.aarch64.rpm
pg_textsearch_181.5.1el10.aarch64pgdg200.3 KiBpg_textsearch_18-1.5.1-2PGDG.rhel10.1.aarch64.rpm
pg_textsearch_181.5.1el10.aarch64pgdg200.0 KiBpg_textsearch_18-1.5.1-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_181.5.1el10.aarch64pgdg199.9 KiBpg_textsearch_18-1.5.1-1PGDG.rhel10.1.aarch64.rpm
pg_textsearch_181.4.0el10.aarch64pgdg125.7 KiBpg_textsearch_18-1.4.0-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_181.4.0el10.aarch64pgdg125.7 KiBpg_textsearch_18-1.4.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-18-textsearch1.6.0d12.x86_64pigsty1.9 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~bookworm_amd64.deb
postgresql-18-textsearch1.6.0d12.aarch64pigsty1.9 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~bookworm_arm64.deb
postgresql-18-textsearch1.6.0d13.x86_64pigsty1.9 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~trixie_amd64.deb
postgresql-18-textsearch1.6.0d13.aarch64pigsty1.9 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~trixie_arm64.deb
postgresql-18-textsearch1.6.0u22.x86_64pigsty2.1 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~jammy_amd64.deb
postgresql-18-textsearch1.6.0u22.aarch64pigsty2.1 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~jammy_arm64.deb
postgresql-18-textsearch1.6.0u24.x86_64pigsty2.1 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~noble_amd64.deb
postgresql-18-textsearch1.6.0u24.aarch64pigsty2.0 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~noble_arm64.deb
postgresql-18-textsearch1.6.0u26.x86_64pigsty2.1 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~resolute_amd64.deb
postgresql-18-textsearch1.6.0u26.aarch64pigsty2.1 MiBpostgresql-18-textsearch_1.6.0-1PGSTY~resolute_arm64.deb
软件包版本平台仓库大小下载
pg_textsearch_171.6.0el8.x86_64pgdg221.0 KiBpg_textsearch_17-1.6.0-1PGDG.rhel8.10.x86_64.rpm
pg_textsearch_171.5.1el8.x86_64pgdg210.5 KiBpg_textsearch_17-1.5.1-2PGDG.rhel8.10.x86_64.rpm
pg_textsearch_171.5.1el8.x86_64pgdg210.3 KiBpg_textsearch_17-1.5.1-1PGDG.rhel8.10.x86_64.rpm
pg_textsearch_171.4.0el8.x86_64pgdg129.3 KiBpg_textsearch_17-1.4.0-1PGDG.rhel8.10.x86_64.rpm
pg_textsearch_171.6.0el8.aarch64pgdg204.6 KiBpg_textsearch_17-1.6.0-1PGDG.rhel8.10.aarch64.rpm
pg_textsearch_171.5.1el8.aarch64pgdg194.8 KiBpg_textsearch_17-1.5.1-2PGDG.rhel8.10.aarch64.rpm
pg_textsearch_171.5.1el8.aarch64pgdg194.4 KiBpg_textsearch_17-1.5.1-1PGDG.rhel8.10.aarch64.rpm
pg_textsearch_171.4.0el8.aarch64pgdg122.5 KiBpg_textsearch_17-1.4.0-1PGDG.rhel8.10.aarch64.rpm
pg_textsearch_171.6.0el9.x86_64pgdg216.8 KiBpg_textsearch_17-1.6.0-1PGDG.rhel9.9.x86_64.rpm
pg_textsearch_171.6.0el9.x86_64pgdg216.8 KiBpg_textsearch_17-1.6.0-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_171.6.0el9.x86_64pgdg216.8 KiBpg_textsearch_17-1.6.0-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_171.5.1el9.x86_64pgdg206.6 KiBpg_textsearch_17-1.5.1-2PGDG.rhel9.9.x86_64.rpm
pg_textsearch_171.5.1el9.x86_64pgdg206.6 KiBpg_textsearch_17-1.5.1-2PGDG.rhel9.8.x86_64.rpm
pg_textsearch_171.5.1el9.x86_64pgdg206.6 KiBpg_textsearch_17-1.5.1-2PGDG.rhel9.7.x86_64.rpm
pg_textsearch_171.5.1el9.x86_64pgdg206.3 KiBpg_textsearch_17-1.5.1-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_171.5.1el9.x86_64pgdg206.3 KiBpg_textsearch_17-1.5.1-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_171.4.0el9.x86_64pgdg125.7 KiBpg_textsearch_17-1.4.0-1PGDG.rhel9.8.x86_64.rpm
pg_textsearch_171.4.0el9.x86_64pgdg125.7 KiBpg_textsearch_17-1.4.0-1PGDG.rhel9.7.x86_64.rpm
pg_textsearch_171.6.0el9.aarch64pgdg206.4 KiBpg_textsearch_17-1.6.0-1PGDG.rhel9.9.aarch64.rpm
pg_textsearch_171.6.0el9.aarch64pgdg206.4 KiBpg_textsearch_17-1.6.0-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_171.6.0el9.aarch64pgdg206.4 KiBpg_textsearch_17-1.6.0-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_171.5.1el9.aarch64pgdg196.5 KiBpg_textsearch_17-1.5.1-2PGDG.rhel9.9.aarch64.rpm
pg_textsearch_171.5.1el9.aarch64pgdg196.5 KiBpg_textsearch_17-1.5.1-2PGDG.rhel9.8.aarch64.rpm
pg_textsearch_171.5.1el9.aarch64pgdg196.5 KiBpg_textsearch_17-1.5.1-2PGDG.rhel9.7.aarch64.rpm
pg_textsearch_171.5.1el9.aarch64pgdg196.3 KiBpg_textsearch_17-1.5.1-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_171.5.1el9.aarch64pgdg196.2 KiBpg_textsearch_17-1.5.1-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_171.4.0el9.aarch64pgdg123.1 KiBpg_textsearch_17-1.4.0-1PGDG.rhel9.8.aarch64.rpm
pg_textsearch_171.4.0el9.aarch64pgdg123.1 KiBpg_textsearch_17-1.4.0-1PGDG.rhel9.7.aarch64.rpm
pg_textsearch_171.6.0el10.x86_64pgdg223.8 KiBpg_textsearch_17-1.6.0-1PGDG.rhel10.3.x86_64.rpm
pg_textsearch_171.6.0el10.x86_64pgdg224.2 KiBpg_textsearch_17-1.6.0-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_171.6.0el10.x86_64pgdg224.2 KiBpg_textsearch_17-1.6.0-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_171.5.1el10.x86_64pgdg213.1 KiBpg_textsearch_17-1.5.1-2PGDG.rhel10.3.x86_64.rpm
pg_textsearch_171.5.1el10.x86_64pgdg213.0 KiBpg_textsearch_17-1.5.1-2PGDG.rhel10.2.x86_64.rpm
pg_textsearch_171.5.1el10.x86_64pgdg213.0 KiBpg_textsearch_17-1.5.1-2PGDG.rhel10.1.x86_64.rpm
pg_textsearch_171.5.1el10.x86_64pgdg212.7 KiBpg_textsearch_17-1.5.1-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_171.5.1el10.x86_64pgdg212.6 KiBpg_textsearch_17-1.5.1-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_171.4.0el10.x86_64pgdg129.4 KiBpg_textsearch_17-1.4.0-1PGDG.rhel10.2.x86_64.rpm
pg_textsearch_171.4.0el10.x86_64pgdg129.4 KiBpg_textsearch_17-1.4.0-1PGDG.rhel10.1.x86_64.rpm
pg_textsearch_171.6.0el10.aarch64pgdg210.5 KiBpg_textsearch_17-1.6.0-1PGDG.rhel10.3.aarch64.rpm
pg_textsearch_171.6.0el10.aarch64pgdg210.6 KiBpg_textsearch_17-1.6.0-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_171.6.0el10.aarch64pgdg210.6 KiBpg_textsearch_17-1.6.0-1PGDG.rhel10.1.aarch64.rpm
pg_textsearch_171.5.1el10.aarch64pgdg200.1 KiBpg_textsearch_17-1.5.1-2PGDG.rhel10.3.aarch64.rpm
pg_textsearch_171.5.1el10.aarch64pgdg200.3 KiBpg_textsearch_17-1.5.1-2PGDG.rhel10.2.aarch64.rpm
pg_textsearch_171.5.1el10.aarch64pgdg200.3 KiBpg_textsearch_17-1.5.1-2PGDG.rhel10.1.aarch64.rpm
pg_textsearch_171.5.1el10.aarch64pgdg199.9 KiBpg_textsearch_17-1.5.1-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_171.5.1el10.aarch64pgdg200.0 KiBpg_textsearch_17-1.5.1-1PGDG.rhel10.1.aarch64.rpm
pg_textsearch_171.4.0el10.aarch64pgdg125.7 KiBpg_textsearch_17-1.4.0-1PGDG.rhel10.2.aarch64.rpm
pg_textsearch_171.4.0el10.aarch64pgdg125.7 KiBpg_textsearch_17-1.4.0-1PGDG.rhel10.1.aarch64.rpm
postgresql-17-textsearch1.6.0d12.x86_64pigsty1.9 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~bookworm_amd64.deb
postgresql-17-textsearch1.6.0d12.aarch64pigsty1.9 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~bookworm_arm64.deb
postgresql-17-textsearch1.6.0d13.x86_64pigsty1.9 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~trixie_amd64.deb
postgresql-17-textsearch1.6.0d13.aarch64pigsty1.9 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~trixie_arm64.deb
postgresql-17-textsearch1.6.0u22.x86_64pigsty2.2 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~jammy_amd64.deb
postgresql-17-textsearch1.6.0u22.aarch64pigsty2.2 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~jammy_arm64.deb
postgresql-17-textsearch1.6.0u24.x86_64pigsty2.0 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~noble_amd64.deb
postgresql-17-textsearch1.6.0u24.aarch64pigsty2.0 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~noble_arm64.deb
postgresql-17-textsearch1.6.0u26.x86_64pigsty2.1 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~resolute_amd64.deb
postgresql-17-textsearch1.6.0u26.aarch64pigsty2.0 MiBpostgresql-17-textsearch_1.6.0-1PGSTY~resolute_arm64.deb

源码

pig build pkg pg_textsearch;		# build rpm/deb

安装

启用 PGDG 和 PIGSTY 仓库并更新缓存。

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

使用 pig 安装扩展。

pig install pg_textsearch;		# install by package name

pig install pg_textsearch -v 19;   # install for PG 19
pig install pg_textsearch -v 18;   # install for PG 18
pig install pg_textsearch -v 17;   # install for PG 17

将扩展加入 shared_preload_libraries,详见配置说明。

shared_preload_libraries = 'pg_textsearch';

在数据库中创建扩展。

CREATE EXTENSION pg_textsearch;

用法

来源:

pg_textsearch 1.6.1 通过 bm25 访问方法与 <@> 运算符,在 PostgreSQL 17–19 中提供 BM25 排序的文本检索。

启用与查询

管理员须将库加入已有预加载列表并重启 PostgreSQL。安装扩展需要提升权限。

shared_preload_libraries = 'pg_textsearch'
CREATE EXTENSION pg_textsearch;
CREATE TABLE documents (id bigserial PRIMARY KEY, content text);
INSERT INTO documents(content) VALUES
    ('PostgreSQL is a database system'),
    ('BM25 ranks full text search results');
CREATE INDEX docs_idx ON documents USING bm25(content)
WITH (text_config = 'english');

SELECT id, content <@> 'database system' AS score
FROM documents
ORDER BY content <@> 'database system'
LIMIT 5;

分数是 BM25 值的相反数,越小越靠前。部分索引、歧义表达式、预备或动态查询文本及 PL/pgSQL 应明确指定索引。独立评分要求对索引表或列具有 SELECT 权限。

SELECT id FROM documents
ORDER BY content <@> to_bm25query('database system', 'docs_idx')
LIMIT 5;

过滤与索引选项

text_config 必填;k1 默认为 1.2,b 默认为 0.75。支持不可变文本表达式、文本类数组、部分索引及分区表。查询须重复索引表达式,部分索引还须有匹配的过滤条件。中文文本可选用 zhparser 等解析器。

SET default_text_search_config = 'english';
SELECT id FROM documents
WHERE content @@ to_tsquery('english', 'database & !mysql')
ORDER BY content <@> 'database'
LIMIT 5;

布尔查询支持 AND/OR/NOT、短语、前缀与权重。短语和权重条件可能需要表行复查。文本搜索配置须与索引一致;使用缓存的布尔查询计划期间若配置发生变化,应释放并重新准备语句。

1.6.0 可在排序扫描内部执行符合条件的常量布尔谓词,前提是每个匹配结果必然包含某个排序词项。其他形式,包括查询词未知的通用计划,继续由 PostgreSQL 过滤和排序。后置过滤的排序扫描会扩大评分批次,直到获得足够的合格行或遍历完匹配项。应检查 EXPLAIN;较小的 LIMIT 不保证工作量小。

维护与使用边界

持久化内存表位于受 WAL 保护的索引页中。共享内存缓存可选;pg_textsearch.memory_limit 默认 2GB,是准入预算的近似值,并非严格上限。pg_textsearch.default_limit 默认 1000,在 SQL 没有限制条数时决定初始批次大小。刷写和串行 VACUUM 可能执行同步压实。

SELECT bm25_spill_index('docs_idx');
SELECT bm25_force_merge('docs_idx');

修改索引的维护函数要求索引所有权,不处理分区父索引,也不能在恢复期间执行。已经发布的物理合并不会被 ROLLBACK 撤销。可选的受管理后台压实需要上游规定的额外配置,内联/手动模式不依赖该配置。执行查询的热备库需要 hot_standby_feedback = on,以便在活动快照期间延迟物理页复用。

bm25 访问方法名与 pg_search、vchord_bm25 等其他提供者冲突。RLS 隐藏行,但 BM25 语料统计仍反映全部索引行。超级用户可将 pg_textsearch.allow_rls 设为 off,拒绝新建或重建与 RLS 组合的索引;该设置不会禁用已有索引。

升级到 1.6.1

安装匹配的库与 SQL 文件,重启 PostgreSQL,然后更新每个数据库:

ALTER EXTENSION pg_textsearch UPDATE TO '1.6.1';

1.6.1 修复有序扫描、关联过滤及 RLS 下的评分复用,并修复并发 VACUUM 期间的独立评分和部分表达式索引的并行构建。从 1.6.0 升级无需 REINDEX。下述修复要求针对更早版本已受影响的索引。旧版涉及 HOT 链的并行构建可能遗漏行,中断的 VACUUM 也可能留下错误计数或位图。受影响的索引必须重建;升级二进制与 SQL 无法修复其内容。

REINDEX INDEX docs_idx;

普通 REINDEX 会阻塞写入。旧索引还须检查所有跨越版本的升级说明:1.3 之前未刷写的数据需在旧二进制下处理;1.5 之前的索引可能在否定布尔查询中漏掉空文档或仅含停用词的文档;1.5 之前的服务器无法读取版本 9 的索引头。在新二进制修改索引头之前须升级备库,降级二进制不会撤销格式变化。

表格阅读器