ts_debug() 是一个系统函数,它从提供的文档中提取和规范化令牌,并返回有关每个令牌如何被处理的信息。
ts_debug() 是在 PostgreSQL 8.3 中添加的。
用法
ts_debug ( [configregconfig, ]documenttext) →
setof record (aliastext,descriptiontext,tokentext,dictionariesregdictionary[],dictionaryregdictionary,lexemestext[] )
ts_debug() 主要用于测试全文搜索配置。
变更历史
- PostgreSQL 8.3
- 添加(提交 140d4ebc)
示例
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)
