164 Star 224 Fork 1.2K

openGauss / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
词典测试.md 676 Bytes
一键复制 编辑 原始数据 按行查看 历史
liyang 提交于 2020-05-29 19:27 . Upload openGauss information

词典测试

函数ts_lexize用于进行词典测试。

ts_lexize(dict regdictionary, token text) returns text[]如果输入的token可以被词典识别,那么ts_lexize返回词素的数组;如果token可以被词典识别到它是一个停用词,则返回空数组;如果是一个不可识别的词则返回NULL。

比如:

postgres=# SELECT ts_lexize('english_stem', 'stars');
 ts_lexize
-----------
 {star}

postgres=# SELECT ts_lexize('english_stem', 'a');
 ts_lexize
-----------
 {}

须知:
ts_lexize函数支持单一token,不支持文本。

1
https://gitee.com/opengauss/docs.git
git@gitee.com:opengauss/docs.git
opengauss
docs
docs
1.0.1

搜索帮助