{"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","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"],"signature":"websearch_to_tsquery ( [ config regconfig, ] query text ) → tsquery","signature_count":1,"slug":"websearch-to-tsquery","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","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":"2026-09-14T13:14:25.684213+00:00@99e6866c","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":"","description_zh_html":"","doc":{"anchor":"TEXTSEARCH-FUNCTIONS-TABLE","file":"functions-textsearch.html","slug":"18"},"group":"textsearch","group_label":"Text Search Functions And Operators","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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"TEXTSEARCH-FUNCTIONS-TABLE","file":"functions-textsearch.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"websearch-to-tsquery","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"websearch_to_tsquery","Summary":"将文本转换为tsquery，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。“or”一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","BodyHTML":"将文本转换为\u003ccode\u003etsquery\u003c/code\u003e，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。\u003cspan\u003e“\u003cspan\u003eor\u003c/span\u003e”\u003c/span\u003e一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。\u003cpre\u003ewebsearch_to_tsquery ( [ config regconfig, ] query text ) → tsquery\u003c/pre\u003e将文本转换为\u003ccode\u003etsquery\u003c/code\u003e，根据指定的或默认配置对单词进行正规化。带引号的单词序列被转换为短语测试。\u003cspan\u003e“\u003cspan\u003eor\u003c/span\u003e”\u003c/span\u003e一词产生 OR 操作符，短横线产生 NOT 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","SourceRevision":"1b5ca64c","ContentHash":"281c26989681b52e0aadfc00b9a9cbf428677d72cf0b28866cbec330e051e8d4","Payload":{"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 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","signatures":[{"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 操作符；其他标点符号会被忽略。这类似于一些常见网络搜索工具的行为。","returns":"tsquery","text":"websearch_to_tsquery ( [ config regconfig, ] query text ) → tsquery","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"70f6bb6de2e210ac054b85ce53b6a6530ff96cdbe752dae33e8255f865c4db29","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
