psql支持

psql命令行实用程序提供了一个元命令,用于显示有关Greenplum数据库全文搜索配置的信息。

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

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

可选 + 生成更多细节。

可选参数PATTERN可以是文本搜索对象的名称,指定schema是可选的。 如果省略PATTERN,则将显示有关所有可见对象的信息。 PATTERN可以是正则表达式,可以为schema和对象名称提供单独的模式。 以下示例说明了这一点:

  1. => \dF *fulltext*
  2. List of text search configurations
  3. Schema | Name | Description
  4. --------+--------------+-------------
  5. public | fulltext_cfg |
  1. => \dF *.fulltext*
  2. List of text search configurations
  3. Schema | Name | Description
  4. ----------+----------------------------
  5. fulltext | fulltext_cfg |
  6. public | fulltext_cfg |

可用的命令是:

\dF[+] [PATTERN]

列出文本搜索配置(添加 + 以获取更多详细信息)。

  1. => \dF russian
  2. List of text search configurations
  3. Schema | Name | Description
  4. ------------+---------+------------------------------------
  5. pg_catalog | russian | configuration for russian language
  6. => \dF+ russian
  7. Text search configuration "pg_catalog.russian"
  8. Parser: "pg_catalog.default"
  9. Token | Dictionaries
  10. -----------------+--------------
  11. asciihword | english_stem
  12. asciiword | english_stem
  13. email | simple
  14. file | simple
  15. float | simple
  16. host | simple
  17. hword | russian_stem
  18. hword_asciipart | english_stem
  19. hword_numpart | simple
  20. hword_part | russian_stem
  21. int | simple
  22. numhword | simple
  23. numword | simple
  24. sfloat | simple
  25. uint | simple
  26. url | simple
  27. url_path | simple
  28. version | simple
  29. word | russian_stem

\dFd[+] [PATTERN]

列出文本搜索词典(添加 + 以获取更多详细信息)。

  1. => \dFd
  2. List of text search dictionaries
  3. Schema | Name | Description
  4. ------------+-----------------+-----------------------------------------------------------
  5. pg_catalog | danish_stem | snowball stemmer for danish language
  6. pg_catalog | dutch_stem | snowball stemmer for dutch language
  7. pg_catalog | english_stem | snowball stemmer for english language
  8. pg_catalog | finnish_stem | snowball stemmer for finnish language
  9. pg_catalog | french_stem | snowball stemmer for french language
  10. pg_catalog | german_stem | snowball stemmer for german language
  11. pg_catalog | hungarian_stem | snowball stemmer for hungarian language
  12. pg_catalog | italian_stem | snowball stemmer for italian language
  13. pg_catalog | norwegian_stem | snowball stemmer for norwegian language
  14. pg_catalog | portuguese_stem | snowball stemmer for portuguese language
  15. pg_catalog | romanian_stem | snowball stemmer for romanian language
  16. pg_catalog | russian_stem | snowball stemmer for russian language
  17. pg_catalog | simple | simple dictionary: just lower case and check for stopword
  18. pg_catalog | spanish_stem | snowball stemmer for spanish language
  19. pg_catalog | swedish_stem | snowball stemmer for swedish language
  20. pg_catalog | turkish_stem | snowball stemmer for turkish language

\dFp[+] [PATTERN]

列出文本搜索解析器(添加 + 以获取更多详细信息)。

  1. => \dFp
  2. List of text search parsers
  3. Schema | Name | Description
  4. ------------+---------+---------------------
  5. pg_catalog | default | default word parser
  6. => \dFp+
  7. Text search parser "pg_catalog.default"
  8. Method | Function | Description
  9. -----------------+----------------+-------------
  10. Start parse | prsd_start |
  11. Get next token | prsd_nexttoken |
  12. End parse | prsd_end |
  13. Get headline | prsd_headline |
  14. Get token types | prsd_lextype |
  15. Token types for parser "pg_catalog.default"
  16. Token name | Description
  17. -----------------+------------------------------------------
  18. asciihword | Hyphenated word, all ASCII
  19. asciiword | Word, all ASCII
  20. blank | Space symbols
  21. email | Email address
  22. entity | XML entity
  23. file | File or path name
  24. float | Decimal notation
  25. host | Host
  26. hword | Hyphenated word, all letters
  27. hword_asciipart | Hyphenated word part, all ASCII
  28. hword_numpart | Hyphenated word part, letters and digits
  29. hword_part | Hyphenated word part, all letters
  30. int | Signed integer
  31. numhword | Hyphenated word, letters and digits
  32. numword | Word, letters and digits
  33. protocol | Protocol head
  34. sfloat | Scientific notation
  35. tag | XML tag
  36. uint | Unsigned integer
  37. url | URL
  38. url_path | URL path
  39. version | Version number
  40. word | Word, all letters
  41. (23 rows)

\dFt[+] [PATTERN]

列出文本搜索模板(添加 + 以获取更多详细信息)。

  1. => \dFt
  2. List of text search templates
  3. Schema | Name | Description
  4. ------------+-----------+-----------------------------------------------------------
  5. pg_catalog | ispell | ispell dictionary
  6. pg_catalog | simple | simple dictionary: just lower case and check for stopword
  7. pg_catalog | snowball | snowball stemmer
  8. pg_catalog | synonym | synonym dictionary: replace word by its synonym
  9. pg_catalog | thesaurus | thesaurus dictionary: phrase by phrase substitution

Parent topic: 使用全文搜索