> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/15/the-sql-language/12.-quan-wen-jian-suo.md).

# 12. 全文檢索

## 12. 全文檢索

**Table of Contents**

[12.1. Introduction](/15/the-sql-language/12.-quan-wen-jian-suo/12.1.-jian-jie.md)

[12.1.1. What Is a Document?](/15/the-sql-language/12.-quan-wen-jian-suo/12.1.-jian-jie.md#TEXTSEARCH-DOCUMENT)

[12.1.2. Basic Text Matching](/15/the-sql-language/12.-quan-wen-jian-suo/12.1.-jian-jie.md#TEXTSEARCH-MATCHING)

[12.1.3. Configurations](/15/the-sql-language/12.-quan-wen-jian-suo/12.1.-jian-jie.md#TEXTSEARCH-INTRO-CONFIGURATIONS)

[12.2. Tables and Indexes](/15/the-sql-language/12.-quan-wen-jian-suo/12.2.-cha-xun-yu-suo-yin.md)

[12.2.1. Searching a Table](/15/the-sql-language/12.-quan-wen-jian-suo/12.2.-cha-xun-yu-suo-yin.md#TEXTSEARCH-TABLES-SEARCH)

[12.2.2. Creating Indexes](/15/the-sql-language/12.-quan-wen-jian-suo/12.2.-cha-xun-yu-suo-yin.md#TEXTSEARCH-TABLES-INDEX)

[12.3. Controlling Text Search](/15/the-sql-language/12.-quan-wen-jian-suo/12.3.-xi-bu-kong-zhi.md)

[12.3.1. Parsing Documents](/15/the-sql-language/12.-quan-wen-jian-suo/12.3.-xi-bu-kong-zhi.md#TEXTSEARCH-PARSING-DOCUMENTS)

[12.3.2. Parsing Queries](/15/the-sql-language/12.-quan-wen-jian-suo/12.3.-xi-bu-kong-zhi.md#TEXTSEARCH-PARSING-QUERIES)

[12.3.3. Ranking Search Results](/15/the-sql-language/12.-quan-wen-jian-suo/12.3.-xi-bu-kong-zhi.md#TEXTSEARCH-RANKING)

[12.3.4. Highlighting Results](/15/the-sql-language/12.-quan-wen-jian-suo/12.3.-xi-bu-kong-zhi.md#TEXTSEARCH-HEADLINE)

[12.4. Additional Features](/15/the-sql-language/12.-quan-wen-jian-suo/12.4.-yan-shen-gong-neng.md)

[12.4.1. Manipulating Documents](/15/the-sql-language/12.-quan-wen-jian-suo/12.4.-yan-shen-gong-neng.md#TEXTSEARCH-MANIPULATE-TSVECTOR)

[12.4.2. Manipulating Queries](/15/the-sql-language/12.-quan-wen-jian-suo/12.4.-yan-shen-gong-neng.md#TEXTSEARCH-MANIPULATE-TSQUERY)

[12.4.3. Triggers for Automatic Updates](/15/the-sql-language/12.-quan-wen-jian-suo/12.4.-yan-shen-gong-neng.md#TEXTSEARCH-UPDATE-TRIGGERS)

[12.4.4. Gathering Document Statistics](/15/the-sql-language/12.-quan-wen-jian-suo/12.4.-yan-shen-gong-neng.md#TEXTSEARCH-STATISTICS)

[12.5. Parsers](/15/the-sql-language/12.-quan-wen-jian-suo/12.5.-duan-ci.md)

[12.6. Dictionaries](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md)

[12.6.1. Stop Words](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md#TEXTSEARCH-STOPWORDS)

[12.6.2. Simple Dictionary](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md#TEXTSEARCH-SIMPLE-DICTIONARY)

[12.6.3. Synonym Dictionary](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md#TEXTSEARCH-SYNONYM-DICTIONARY)

[12.6.4. Thesaurus Dictionary](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md#TEXTSEARCH-THESAURUS)

[12.6.5. Ispell Dictionary](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md#TEXTSEARCH-ISPELL-DICTIONARY)

[12.6.6. Snowball Dictionary](/15/the-sql-language/12.-quan-wen-jian-suo/12.6.-zi-dian.md#TEXTSEARCH-SNOWBALL-DICTIONARY)

[12.7. Configuration Example](/15/the-sql-language/12.-quan-wen-jian-suo/12.7.-zu-tai-fan-li.md)

[12.8. Testing and Debugging Text Search](/15/the-sql-language/12.-quan-wen-jian-suo/12.8.-ce-shi-yu-chu-cuo.md)

[12.8.1. Configuration Testing](/15/the-sql-language/12.-quan-wen-jian-suo/12.8.-ce-shi-yu-chu-cuo.md#TEXTSEARCH-CONFIGURATION-TESTING)

[12.8.2. Parser Testing](/15/the-sql-language/12.-quan-wen-jian-suo/12.8.-ce-shi-yu-chu-cuo.md#TEXTSEARCH-PARSER-TESTING)

[12.8.3. Dictionary Testing](/15/the-sql-language/12.-quan-wen-jian-suo/12.8.-ce-shi-yu-chu-cuo.md#TEXTSEARCH-DICTIONARY-TESTING)

[12.9. Preferred Index Types for Text Search](/15/the-sql-language/12.-quan-wen-jian-suo/12.9.-gin-ji-gist-suo-yin-xing-bie.md)

[12.10. psql Support](/15/the-sql-language/12.-quan-wen-jian-suo/12.10.-psql-zhi-yuan.md)

[12.11. Limitations](/15/the-sql-language/12.-quan-wen-jian-suo/12.11.-gong-neng-xian-zhi.md)

***

原文：[PostgreSQL 15.19 Documentation](/15/the-sql-language/12.-quan-wen-jian-suo.md)（英文原文，待翻譯）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/15/the-sql-language/12.-quan-wen-jian-suo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
