ts_debug()

一个返回有关令牌如何被处理的信息的函数

ts_debug() 是一个系统函数,它从提供的文档中提取和规范化令牌,并返回有关每个令牌如何被处理的信息。

ts_debug() 是在 PostgreSQL 8.3 中添加的。

用法

ts_debug ( [ config regconfig, ] document text ) →
         setof record ( alias text, description text, token text, dictionaries regdictionary[], dictionary regdictionary, lexemes text[] )

ts_debug() 主要用于测试全文搜索配置。

变更历史

示例

ts_debug() 的基本用法示例

postgres=# SELECT * FROM ts_debug('english', 'The quick brown fox@gmail.com');
   alias   |   description   |     token     |  dictionaries  |  dictionary  |     lexemes     
-----------+-----------------+---------------+----------------+--------------+-----------------
 asciiword | Word, all ASCII | The           | {english_stem} | english_stem | {}
 blank     | Space symbols   |               | {}             |              | 
 asciiword | Word, all ASCII | quick         | {english_stem} | english_stem | {quick}
 blank     | Space symbols   |               | {}             |              | 
 asciiword | Word, all ASCII | brown         | {english_stem} | english_stem | {brown}
 blank     | Space symbols   |               | {}             |              | 
 email     | Email address   | fox@gmail.com | {simple}       | simple       | {fox@gmail.com}
(7 rows)

分类

全文搜索, 系统函数, 测试

另请参阅

ts_parse(), ts_token_type(), ts_lexize(), ts_stat()

反馈

提交关于“ts_debug()”的任何评论、建议或更正,请在此处 提交