数据仓库服务 GAUSSDB(DWS)-解析查询:plainto_tsquery

时间:2024-05-09 09:30:40

plainto_tsquery

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

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

比如:

1
2
3
4
5
SELECT plainto_tsquery('english', 'The Fat Rats');
 plainto_tsquery 
-----------------
 'fat' & 'rat'
(1 row)

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

1
2
3
4
5
SELECT plainto_tsquery('english', 'The Fat & Rats:C');
   plainto_tsquery   
---------------------
 'fat' & 'rat' & 'c'
(1 row)

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

support.huaweicloud.com/sqlreference-dws/dws_06_0093.html