> 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/19/the-sql-language/textsearch.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 第 12 章 全文檢索

**目錄**

* [12.1. 簡介](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-intro.md)
  * [12.1.1. 什麼是文件？](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-intro.md#textsearch-document)
  * [12.1.2. 基本文字比對](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-intro.md#textsearch-matching)
  * [12.1.3. 設定](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-intro.md#textsearch-intro-configurations)
* [12.2. 資料表與索引](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-tables.md)
  * [12.2.1. 搜尋資料表](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-tables.md#textsearch-tables-search)
  * [12.2.2. 建立索引](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-tables.md#textsearch-tables-index)
* [12.3. 控制文字搜尋](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-controls.md)
  * [12.3.1. 剖析文件](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-controls.md#textsearch-parsing-documents)
  * [12.3.2. 剖析查詢](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-controls.md#textsearch-parsing-queries)
  * [12.3.3. 搜尋結果排名](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-controls.md#textsearch-ranking)
  * [12.3.4. 標示搜尋結果](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-controls.md#textsearch-headline)
* [12.4. 其他功能](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-features.md)
  * [12.4.1. 操作文件](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-features.md#textsearch-manipulate-tsvector)
  * [12.4.2. 操作查詢](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-features.md#textsearch-manipulate-tsquery)
  * [12.4.3. 自動更新用的觸發程序](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-features.md#textsearch-update-triggers)
  * [12.4.4. 收集文件統計資訊](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-features.md#textsearch-statistics)
* [12.5. 剖析器](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-parsers.md)
* [12.6. 字典](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md)
  * [12.6.1. 停用詞](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-stopwords)
  * [12.6.2. Simple 字典](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-simple-dictionary)
  * [12.6.3. 同義詞字典](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-synonym-dictionary)
  * [12.6.4. 同義詞庫字典](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-thesaurus)
  * [12.6.5. Ispell 字典](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-ispell-dictionary)
  * [12.6.6. Snowball 字典](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-dictionaries.md#textsearch-snowball-dictionary)
* [12.7. 設定範例](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-configuration.md)
* [12.8. 測試與除錯文字搜尋](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-debugging.md)
  * [12.8.1. 設定測試](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-debugging.md#textsearch-configuration-testing)
  * [12.8.2. 剖析器測試](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-debugging.md#textsearch-parser-testing)
  * [12.8.3. 字典測試](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-debugging.md#textsearch-dictionary-testing)
* [12.9. 文字搜尋的建議索引型別](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-indexes.md)
* [12.10. psql 支援](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-psql.md)
* [12.11. 限制](https://docs.postgresql.tw/19/the-sql-language/textsearch/textsearch-limitations.md)

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/textsearch.html)（原文版本：18.6；核對日期：2026-09-11）


---

# 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/19/the-sql-language/textsearch.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.
