{"Entry":{"collection":"sql","key":"create-text-search-dictionary","name":"CREATE TEXT SEARCH DICTIONARY","aliases":["createtsdictionary"],"metadata":{"aliases":["createtsdictionary"],"changed_in":[],"changes":[{"from":"8.2","purpose_changed":false,"renamed":null,"sections":{"added":[],"changed":[],"removed":[]},"status":"added","synopsis":null,"to":"8.3"}],"content_hash":"4fa5c9a802050b7b0c26955fe019b54b6da56cdd3ca7f04580121371027434fd","derived_content_hash":"1f6c040ddfe41bb4fe76092e4c7ad990a8e7c999f7b5a2da137c99eeea8c8bb1","editorial":{},"first_version":"8.3","group":"textsearch","imported_at":"2026-09-30T17:43:38.590313+08:00","last_version":"20","name":"CREATE TEXT SEARCH DICTIONARY","object":"TEXT SEARCH DICTIONARY","position":8003,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"purpose":"define a new text search dictionary","purpose_zh":"","related":["alter-text-search-dictionary","drop-text-search-dictionary"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:aa5814f5b4285d293723777888af1f4c82dfd2707d6beb34a20d6f23e00123e9","receipt_sha256":"dce060780c3f6e2a223abaf2bd7465d0b549641ab16feb0a1a90e6f2fecdd4e7","repair":"wiki-repair-20261023"},"slug":"create-text-search-dictionary","source_rev":"wiki-repair-20261023:c6489fad03cfb36bb015368bcc5d1ed45f4e93b5e915cabc7819501425efab66","synopsis":"CREATE TEXT SEARCH DICTIONARY name (\nTEMPLATE = template\n[, option = value [, ... ]]\n)","verb":"CREATE"}},"Definition":{"Collection":"sql","Key":"create-text-search-dictionary","SourceDatabase":"center","Version":"18","SourceTable":"sqlcmd","SourceKey":"create-text-search-dictionary","SourceRevision":"wiki-repair-20261023:c6489fad03cfb36bb015368bcc5d1ed45f4e93b5e915cabc7819501425efab66","Facts":{"anchor":"SQL-CREATETSDICTIONARY","description_zh":"定义一个新的文本检索词典","description_zh_html":"\u003cpre\u003eCREATE TEXT SEARCH DICTIONARY name (\nTEMPLATE = template\n[, option = value [, ... ]]\n)\u003c/pre\u003e\u003csection\u003e\u003ch2\u003e描述\u003c/h2\u003e\u003cp\u003e\n\u003ccode class=\"command\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e 创建一个新的文本检索词典。文本检索词典指定一种在搜索时识别哪些词值得关注、哪些词不值得关注的方式。词典依赖于文本检索模板，后者规定了实际执行这项工作的函数。通常，词典会提供一些选项，用来控制模板函数的具体行为。\n  \u003c/p\u003e\u003cp\u003e\n   如果给出了一个模式名称，那么该文本检索词典会被创建在指定的模式中。否则它会被创建在当前模式中。\n  \u003c/p\u003e\u003cp\u003e\n   定义文本检索词典的用户将成为其拥有者。\n  \u003c/p\u003e\u003cp\u003e\n   更多信息请参见\u003ca class=\"xref\" href=\"/zh/docs/18/textsearch.html\" title=\"第 12 章 全文检索\"\u003e第 12 章\u003c/a\u003e。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e参数\u003c/h2\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt id=\"ZH18-AUTO-CREATE_TSDICTIONARY-VARLISTENTRY-1\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      要创建的文本检索词典的名称。该名称可以被模式限定。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-CREATE_TSDICTIONARY-VARLISTENTRY-2\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003etemplate\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      用于定义该词典基本行为的文本检索模板名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-CREATE_TSDICTIONARY-VARLISTENTRY-3\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      要为此词典设置的模板相关选项的名称。\n     \u003c/p\u003e\u003c/dd\u003e\u003cdt id=\"ZH18-AUTO-CREATE_TSDICTIONARY-VARLISTENTRY-4\"\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e \u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\n      模板相关选项要使用的值。如果该值不是简单的标识符或数字，则必须用引号括起（当然，如果你愿意，也始终可以加引号）。\n     \u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e\n   这些选项可以按任意顺序出现。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e示例\u003c/h2\u003e\u003cp\u003e\n   下面的示例命令创建了一个基于 Snowball 且使用非标准停用词列表的词典。\n  \u003c/p\u003e\u003cpre class=\"programlisting\"\u003e\nCREATE TEXT SEARCH DICTIONARY my_russian (\n    template = snowball,\n    language = russian,\n    stopwords = myrussian\n);\n\u003c/pre\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e兼容性\u003c/h2\u003e\u003cp\u003e\n   在 SQL 标准中没有\n   \u003ccode class=\"command\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e 语句。\n  \u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003e另见\u003c/h2\u003e\u003cspan class=\"simplelist\"\u003e\u003ca class=\"xref\" href=\"/zh/docs/18/sql-altertsdictionary.html\" title=\"ALTER TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca class=\"xref\" href=\"/zh/docs/18/sql-droptsdictionary.html\" title=\"DROP TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","file":"sql-createtsdictionary.html","lang":"en","name":"CREATE TEXT SEARCH DICTIONARY","purpose":"define a new text search dictionary","purpose_zh":"定义一个新的文本检索词典","related":["alter-text-search-dictionary","drop-text-search-dictionary"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e creates a new text search dictionary. A text search dictionary specifies a way of recognizing interesting or uninteresting words for searching. A dictionary depends on a text search template, which specifies the functions that actually perform the work. Typically the dictionary provides some options that control the detailed behavior of the template's functions.\u003c/p\u003e\u003cp\u003eIf a schema name is given then the text search dictionary is created in the specified schema. Otherwise it is created in the current schema.\u003c/p\u003e\u003cp\u003eThe user who defines a text search dictionary becomes its owner.\u003c/p\u003e\u003cp\u003eRefer to \u003ca href=\"/docs/18/textsearch.html\" title=\"Chapter 12. Full Text Search\"\u003eChapter 12\u003c/a\u003e for further information.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the text search dictionary to be created. The name can be schema-qualified.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003etemplate\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the text search template that will define the basic behavior of this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a template-specific option to be set for this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe value to use for a template-specific option. If the value is not a simple identifier or number, it must be quoted (but you can always quote it, if you wish).\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003eThe options can appear in any order.\u003c/p\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe following example command creates a Snowball-based dictionary with a nonstandard list of stop words.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH DICTIONARY my_russian (\n    template = snowball,\n    language = russian,\n    stopwords = myrussian\n);\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/alter-text-search-dictionary/?v=18\" title=\"ALTER TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-text-search-dictionary/?v=18\" title=\"DROP TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","slug":"18","synopsis_html":"CREATE TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e (\n    TEMPLATE = \u003cem class=\"replaceable\"\u003e\u003ccode\u003etemplate\u003c/code\u003e\u003c/em\u003e\n    [, \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e = \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [, ... ]]\n)","synopsis_text":"CREATE TEXT SEARCH DICTIONARY name (\nTEMPLATE = template\n[, option = value [, ... ]]\n)","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-createtsdictionary.html","sha256":"9668a859757a6cfd23625380ed4316304473ec40b435f76d3a3fb10bf7542f50"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{},"MeasuredEvidence":{}},"Text":{"Collection":"sql","Key":"create-text-search-dictionary","SourceDatabase":"center","Version":"18","Locale":"en","Title":"CREATE TEXT SEARCH DICTIONARY","Summary":"define a new text search dictionary","BodyHTML":"\u003cpre\u003eCREATE TEXT SEARCH DICTIONARY name (\nTEMPLATE = template\n[, option = value [, ... ]]\n)\u003c/pre\u003e\u003csection\u003e\u003ch2\u003eDescription\u003c/h2\u003e\u003cp\u003e\u003ccode\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e creates a new text search dictionary. A text search dictionary specifies a way of recognizing interesting or uninteresting words for searching. A dictionary depends on a text search template, which specifies the functions that actually perform the work. Typically the dictionary provides some options that control the detailed behavior of the template\u0026#39;s functions.\u003c/p\u003e\u003cp\u003eIf a schema name is given then the text search dictionary is created in the specified schema. Otherwise it is created in the current schema.\u003c/p\u003e\u003cp\u003eThe user who defines a text search dictionary becomes its owner.\u003c/p\u003e\u003cp\u003eRefer to \u003ca href=\"/docs/18/textsearch.html\" rel=\"nofollow\"\u003eChapter 12\u003c/a\u003e for further information.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eParameters\u003c/h2\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the text search dictionary to be created. The name can be schema-qualified.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003etemplate\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the text search template that will define the basic behavior of this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a template-specific option to be set for this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003cem\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe value to use for a template-specific option. If the value is not a simple identifier or number, it must be quoted (but you can always quote it, if you wish).\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003eThe options can appear in any order.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eExamples\u003c/h2\u003e\u003cp\u003eThe following example command creates a Snowball-based dictionary with a nonstandard list of stop words.\u003c/p\u003e\u003cpre\u003eCREATE TEXT SEARCH DICTIONARY my_russian (\n    template = snowball,\n    language = russian,\n    stopwords = myrussian\n);\n\u003c/pre\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eCompatibility\u003c/h2\u003e\u003cp\u003eThere is no \u003ccode\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e\u003c/section\u003e\u003csection\u003e\u003ch2\u003eSee Also\u003c/h2\u003e\u003cspan\u003e\u003ca href=\"/wiki/sql/alter-text-search-dictionary/?v=18\" title=\"ALTER TEXT SEARCH DICTIONARY\" rel=\"nofollow\"\u003e\u003cspan\u003eALTER TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-text-search-dictionary/?v=18\" title=\"DROP TEXT SEARCH DICTIONARY\" rel=\"nofollow\"\u003e\u003cspan\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e\u003c/section\u003e","SourceRevision":"wiki-repair-20261023:c6489fad03cfb36bb015368bcc5d1ed45f4e93b5e915cabc7819501425efab66","ContentHash":"878fe65ff8c5ad69ec48bd3fa8d2461f3491056961399b59e2417cfb7ac8587f","Payload":{"related":["alter-text-search-dictionary","drop-text-search-dictionary"],"sections":[{"html":"\u003cp\u003e\u003ccode class=\"command\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e creates a new text search dictionary. A text search dictionary specifies a way of recognizing interesting or uninteresting words for searching. A dictionary depends on a text search template, which specifies the functions that actually perform the work. Typically the dictionary provides some options that control the detailed behavior of the template's functions.\u003c/p\u003e\u003cp\u003eIf a schema name is given then the text search dictionary is created in the specified schema. Otherwise it is created in the current schema.\u003c/p\u003e\u003cp\u003eThe user who defines a text search dictionary becomes its owner.\u003c/p\u003e\u003cp\u003eRefer to \u003ca href=\"/docs/18/textsearch.html\" title=\"Chapter 12. Full Text Search\"\u003eChapter 12\u003c/a\u003e for further information.\u003c/p\u003e","key":"description","title":"Description"},{"html":"\u003cdiv class=\"variablelist\"\u003e\u003cdl class=\"variablelist\"\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the text search dictionary to be created. The name can be schema-qualified.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003etemplate\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of the text search template that will define the basic behavior of this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe name of a template-specific option to be set for this dictionary.\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003eThe value to use for a template-specific option. If the value is not a simple identifier or number, it must be quoted (but you can always quote it, if you wish).\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003eThe options can appear in any order.\u003c/p\u003e","key":"parameters","title":"Parameters"},{"html":"\u003cp\u003eThe following example command creates a Snowball-based dictionary with a nonstandard list of stop words.\u003c/p\u003e\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH DICTIONARY my_russian (\n    template = snowball,\n    language = russian,\n    stopwords = myrussian\n);\n\u003c/pre\u003e","key":"examples","title":"Examples"},{"html":"\u003cp\u003eThere is no \u003ccode class=\"command\"\u003eCREATE TEXT SEARCH DICTIONARY\u003c/code\u003e statement in the SQL standard.\u003c/p\u003e","key":"compatibility","title":"Compatibility"},{"html":"\u003cspan class=\"simplelist\"\u003e\u003ca href=\"/wiki/sql/alter-text-search-dictionary/?v=18\" title=\"ALTER TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eALTER TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"/wiki/sql/drop-text-search-dictionary/?v=18\" title=\"DROP TEXT SEARCH DICTIONARY\"\u003e\u003cspan class=\"refentrytitle\"\u003eDROP TEXT SEARCH DICTIONARY\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e","key":"see_also","title":"See Also"}],"sections_same_as":"","synopsis_html":"CREATE TEXT SEARCH DICTIONARY \u003cem class=\"replaceable\"\u003e\u003ccode\u003ename\u003c/code\u003e\u003c/em\u003e (\n    TEMPLATE = \u003cem class=\"replaceable\"\u003e\u003ccode\u003etemplate\u003c/code\u003e\u003c/em\u003e\n    [, \u003cem class=\"replaceable\"\u003e\u003ccode\u003eoption\u003c/code\u003e\u003c/em\u003e = \u003cem class=\"replaceable\"\u003e\u003ccode\u003evalue\u003c/code\u003e\u003c/em\u003e [, ... ]]\n)","synopsis_text":"CREATE TEXT SEARCH DICTIONARY name (\nTEMPLATE = template\n[, option = value [, ... ]]\n)"}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
