什么是高级?这就叫高级—openGauss(335)

53 阅读1分钟

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/

这样的词素将匹配tsquery中指定字符串和权重的项。

plainto_tsquery([ config regconfig, ] querytext text) returns tsquery

plainto_tsquery将未格式化的文本querytext变换为tsquery。类似于to_tsvector,文本被解析并且标准化,然后在存在的词之间插入&(AND)布尔算子。

比如:

openGauss=# SELECT plainto_tsquery('english', 'The Fat Rats');
 plainto_tsquery 
-----------------
 'fat' & 'rat'
(1 row)

请注意,plainto_tsquery无法识别布尔运算符、权重标签,或在其输入中的前缀匹配标签:

openGauss=# SELECT plainto_tsquery('english', 'The Fat & Rats:C');
   plainto_tsquery   
---------------------
 'fat' & 'rat' & 'c'
(1 row)

在这里,所有输入的标点符号作为空格符号丢弃。

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/