1.SCWS
要使用 zhparser,首先需要安装 SCWS 分词库,SCWS 是 Simple Chinese Word Segmentation 的首字母缩写(即:简易中文分词系统)GitHub
./configure
make install
2.Zhparser
make && make install
遇到:pgxs.mk: 没有那个文件或目录,安装postgres-devel包
找不到pg_config:可以指定PG_CONFG=/usr/pgsql-14/bin/pg_config make
3.postgresql中文检索配置
登录postgresql
启用zhparser
插件
创建使用zhparser
作为解析器的全文搜索的配置
添加token映射
4、全文检索使用
索引创建
查询