{"Entry":{"collection":"func","key":"websearch-to-tsquery","name":"websearch_to_tsquery","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"10","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"11"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"ab7b4b95d19a31ada144155e46d2717e3ea1e2c1d28f1333314716c4e3566481","derived_content_hash":"b0ddc8190ae2e2a3370c65e266f34001813506e561f2ed2051d9de275c404047","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:480020bd08c438daacf5886da6126b582953741bdeb8b429b434ef5a044e27ef","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"11","group":"textsearch","group_label":"Text Search Functions And Operators","groups":["textsearch"],"imported_at":"2026-09-14T21:49:48.753238+08:00","last_version":"20","name":"websearch_to_tsquery","name_key":"websearch_to_tsquery","position":12026,"present_in":["11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"bbcb3f4c707eda93215a6a6135720dfaf24ef1b859257f56429fff4edcbbda43","repair":"wiki-repair-20261023"},"signature":"websearch_to_tsquery ( [ config regconfig, ] query text ) → tsquery","signature_count":1,"slug":"websearch-to-tsquery","source_rev":"wiki-repair-20261023:480020bd08c438daacf5886da6126b582953741bdeb8b429b434ef5a044e27ef","summary":"Converts text to a tsquery, normalizing words according to the specified or default configuration.","summary_zh":""}},"Definition":{"Collection":"func","Key":"websearch-to-tsquery","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"websearch-to-tsquery","SourceRevision":"wiki-repair-20261023:480020bd08c438daacf5886da6126b582953741bdeb8b429b434ef5a044e27ef","Facts":{"description":"Converts text to a tsquery, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word “or” is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_html":"Converts text to a \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_zh":"将文本转换为 tsquery，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。“or”一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","description_zh_html":"将文本转换为 \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","doc":{"anchor":"TEXTSEARCH-FUNCTIONS-TABLE","file":"functions-textsearch.html","sha256":"2383d74fd6eee4b71e1b97dec9754623081103120b67a9793f8deac5fff77727","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-textsearch.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"2383d74fd6eee4b71e1b97dec9754623081103120b67a9793f8deac5fff77727","version":"18.7"},{"file":"functions-textsearch.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"d8d1661c6d67bb109c5266be16236950471c11d91181aafa96e9055792c4fa78","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"textsearch","group_label":"文本搜索函数和操作符","lang":"en","layout":"table-new","pages":["functions-textsearch.html"],"prose_only":false,"signatures":[{"description":"Converts text to a tsquery, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word “or” is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_html":"Converts text to a \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_zh":"将文本转换为 tsquery，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。“or”一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","description_zh_html":"将文本转换为 \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","examples":[{"expr":"websearch_to_tsquery('english', '\"fat rat\" or cat dog')","result":"'fat' \u003c-\u003e 'rat' | 'cat' \u0026 'dog'"}],"html":"\u003ccode class=\"function\"\u003ewebsearch_to_tsquery\u003c/code\u003e ( [\u003cspan class=\"optional\"\u003e\u003cem class=\"parameter\"\u003e\u003ccode\u003econfig\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eregconfig\u003c/code\u003e, \u003c/span\u003e] \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etsquery\u003c/code\u003e","returns":"tsquery","text":"websearch_to_tsquery ( [config regconfig, ] query text ) → tsquery","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-textsearch.html","sha256":"8401bb0d06633da86885cceee001a41a7bc026a1e7cb38731a171ec09f7e10a4"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"TEXTSEARCH-FUNCTIONS-TABLE","file":"functions-textsearch.html","sha256":"2383d74fd6eee4b71e1b97dec9754623081103120b67a9793f8deac5fff77727","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"websearch-to-tsquery","SourceDatabase":"center","Version":"18","Locale":"en","Title":"websearch_to_tsquery","Summary":"Converts text to a tsquery, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word “or” is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","BodyHTML":"Converts text to a \u003ccode\u003etsquery\u003c/code\u003e, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word \u003cspan\u003e“\u003cspan\u003eor\u003c/span\u003e”\u003c/span\u003e is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","SourceRevision":"wiki-repair-20261023:480020bd08c438daacf5886da6126b582953741bdeb8b429b434ef5a044e27ef","ContentHash":"ba7285b9ef1a0b74c8aaa16df1cb9bbea1b26a7cd016377cce2bd71ad23654b9","Payload":{"description":"Converts text to a tsquery, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word “or” is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_html":"Converts text to a \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","signatures":[{"description":"Converts text to a tsquery, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word “or” is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_html":"Converts text to a \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_zh":"将文本转换为 tsquery，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。“or”一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","description_zh_html":"将文本转换为 \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","examples":[{"expr":"websearch_to_tsquery('english', '\"fat rat\" or cat dog')","result":"'fat' \u003c-\u003e 'rat' | 'cat' \u0026 'dog'"}],"html":"\u003ccode class=\"function\"\u003ewebsearch_to_tsquery\u003c/code\u003e ( [\u003cspan class=\"optional\"\u003e\u003cem class=\"parameter\"\u003e\u003ccode\u003econfig\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eregconfig\u003c/code\u003e, \u003c/span\u003e] \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etsquery\u003c/code\u003e","returns":"tsquery","text":"websearch_to_tsquery ( [config regconfig, ] query text ) → tsquery","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"7c12830213e7c419031d300e8bb2060b3acf7e1bffef67199e36624a4f4a57f1","Text":"websearch_to_tsquery ( [config regconfig, ] query text ) → tsquery","Returns":"tsquery","Payload":{"description":"Converts text to a tsquery, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word “or” is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_html":"Converts text to a \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e, normalizing words according to the specified or default configuration. Quoted word sequences are converted to phrase tests. The word \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e is understood as producing an OR operator, and a dash produces a NOT operator; other punctuation is ignored. This approximates the behavior of some common web search tools.","description_zh":"将文本转换为 tsquery，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。“or”一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","description_zh_html":"将文本转换为 \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003eor\u003c/span\u003e”\u003c/span\u003e一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","examples":[{"expr":"websearch_to_tsquery('english', '\"fat rat\" or cat dog')","result":"'fat' \u003c-\u003e 'rat' | 'cat' \u0026 'dog'"}],"html":"\u003ccode class=\"function\"\u003ewebsearch_to_tsquery\u003c/code\u003e ( [\u003cspan class=\"optional\"\u003e\u003cem class=\"parameter\"\u003e\u003ccode\u003econfig\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003eregconfig\u003c/code\u003e, \u003c/span\u003e] \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etsquery\u003c/code\u003e","returns":"tsquery","text":"websearch_to_tsquery ( [config regconfig, ] query text ) → tsquery","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
