博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PostgreSQL 10.1 手册_部分 II. SQL 语言_第 12 章 全文搜索_12.10. psql支持
阅读量:6247 次
发布时间:2019-06-22

本文共 5090 字,大约阅读时间需要 16 分钟。

12.10. psql支持

关于文本搜索配置对象的信息可以在psql中使用一组命令获得:

\dF{d,p,t}[+] [PATTERN]

可选的+能产生更多细节。

可选参数PATTERN可以是一个文本搜索对象的名称,可以是模式限定的。如果PATTERN被忽略,则所有可见对象的信息都将被显示。PATTERN可以是一个正则表达式并且可以为模式和对象名称提供独立的模式。下面的例子展示了这些特性:

=> \dF *fulltext*       List of text search configurations Schema |  Name        | Description--------+--------------+------------- public | fulltext_cfg |

=> \dF *.fulltext*       List of text search configurations Schema   |  Name        | Description----------+---------------------------- fulltext | fulltext_cfg | public   | fulltext_cfg |

可用的命令是:

\dF[+] [PATTERN]

列出文本搜索配置(加上+得到更多细节)。

=> \dF russian            List of text search configurations   Schema   |  Name   |            Description             ------------+---------+------------------------------------ pg_catalog | russian | configuration for russian language=> \dF+ russianText search configuration "pg_catalog.russian"Parser: "pg_catalog.default"      Token      | Dictionaries -----------------+-------------- asciihword      | english_stem asciiword       | english_stem email           | simple file            | simple float           | simple host            | simple hword           | russian_stem hword_asciipart | english_stem hword_numpart   | simple hword_part      | russian_stem int             | simple numhword        | simple numword         | simple sfloat          | simple uint            | simple url             | simple url_path        | simple version         | simple word            | russian_stem

\dFd[+] [PATTERN]

列出文本搜索词典(加上+得到更多细节)。

=> \dFd                            List of text search dictionaries   Schema   |      Name       |                        Description                        ------------+-----------------+----------------------------------------------------------- pg_catalog | danish_stem     | snowball stemmer for danish language pg_catalog | dutch_stem      | snowball stemmer for dutch language pg_catalog | english_stem    | snowball stemmer for english language pg_catalog | finnish_stem    | snowball stemmer for finnish language pg_catalog | french_stem     | snowball stemmer for french language pg_catalog | german_stem     | snowball stemmer for german language pg_catalog | hungarian_stem  | snowball stemmer for hungarian language pg_catalog | italian_stem    | snowball stemmer for italian language pg_catalog | norwegian_stem  | snowball stemmer for norwegian language pg_catalog | portuguese_stem | snowball stemmer for portuguese language pg_catalog | romanian_stem   | snowball stemmer for romanian language pg_catalog | russian_stem    | snowball stemmer for russian language pg_catalog | simple          | simple dictionary: just lower case and check for stopword pg_catalog | spanish_stem    | snowball stemmer for spanish language pg_catalog | swedish_stem    | snowball stemmer for swedish language pg_catalog | turkish_stem    | snowball stemmer for turkish language

\dFp[+] [PATTERN]

列出文本搜索解析器(加上+得到更多细节)。

=> \dFp        List of text search parsers   Schema   |  Name   |     Description     ------------+---------+--------------------- pg_catalog | default | default word parser=> \dFp+    Text search parser "pg_catalog.default"     Method      |    Function    | Description -----------------+----------------+------------- Start parse     | prsd_start     |  Get next token  | prsd_nexttoken |  End parse       | prsd_end       |  Get headline    | prsd_headline  |  Get token types | prsd_lextype   |         Token types for parser "pg_catalog.default"   Token name    |               Description                -----------------+------------------------------------------ asciihword      | Hyphenated word, all ASCII asciiword       | Word, all ASCII blank           | Space symbols email           | Email address entity          | XML entity file            | File or path name float           | Decimal notation host            | Host hword           | Hyphenated word, all letters hword_asciipart | Hyphenated word part, all ASCII hword_numpart   | Hyphenated word part, letters and digits hword_part      | Hyphenated word part, all letters int             | Signed integer numhword        | Hyphenated word, letters and digits numword         | Word, letters and digits protocol        | Protocol head sfloat          | Scientific notation tag             | XML tag uint            | Unsigned integer url             | URL url_path        | URL path version         | Version number word            | Word, all letters(23 rows)

\dFt[+] [PATTERN]

列出文本搜索模板(加上+得到更多细节)。

=> \dFt                           List of text search templates   Schema   |   Name    |                        Description                        ------------+-----------+----------------------------------------------------------- pg_catalog | ispell    | ispell dictionary pg_catalog | simple    | simple dictionary: just lower case and check for stopword pg_catalog | snowball  | snowball stemmer pg_catalog | synonym   | synonym dictionary: replace word by its synonym pg_catalog | thesaurus | thesaurus dictionary: phrase by phrase substitution

本文转自PostgreSQL中文社区,原文链接:

转载地址:http://bxlia.baihongyu.com/

你可能感兴趣的文章
Effective_STL 学习笔记(二十四) 当关乎效率时应该在 map::operator[] 和 map-insert 之间仔细选择...
查看>>
Linux课程---7、shell技巧(获取帮助命令)
查看>>
写一个类似淘宝的ios app需要用到哪些技术?
查看>>
#505. 「LibreOJ β Round」ZQC 的游戏
查看>>
#iOS问题记录# UITextview富文本链接,禁止长按事件
查看>>
深度网络实现手写体识别
查看>>
Python Module_subprocess_调用 Powershell
查看>>
MVC原理图解
查看>>
c基础
查看>>
nodejs 平台的 webscoket 的实现
查看>>
JDK1.8源码(三)——java.util.HashMap
查看>>
给你1000万你可以把生活过的更好吗?
查看>>
<jsp:include page>和<%@ include file%>的区别
查看>>
flash 类和对象的关系
查看>>
保护模式 宏观理解
查看>>
Hat’s Words
查看>>
has_many :through VS has_and_belongs_to_many
查看>>
比较JSF、Spring MVC、Stripes、Struts 2、Tapestry、Wicket
查看>>
正则表达式介绍及案例分享
查看>>
【BZOJ】2125: 最短路 圆方树(静态仙人掌)
查看>>