{"Entry":{"collection":"fts","key":"configuration-tamil","name":"tamil","aliases":[],"metadata":{"aliases":[],"category":"Configurations","content_hash":"96cbec3835a1a266023bc4e17b434c9d3af9cdbc0502527200b8944114d5c329","derived_content_hash":"c04ebdc303ae77196964fcd9551a3c1c68db5ce41420132241188b9c18ed1c3d","imported_at":"2026-09-30T00:40:47.525902+08:00","name":"tamil","name_zh":"","slug":"configuration-tamil","summary":"Text search configuration tamil."}},"Definition":{"Collection":"fts","Key":"configuration-tamil","SourceDatabase":"center","Version":"18","SourceTable":"text_search_component","SourceKey":"configuration-tamil","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"aliases":[],"attributes":{"configuration":"tamil","parser":"default"},"comparison_data":{"mappings":[{"dictionary":"tamil_stem","sequence":"1","token":"asciihword"},{"dictionary":"tamil_stem","sequence":"1","token":"asciiword"},{"dictionary":"simple","sequence":"1","token":"email"},{"dictionary":"simple","sequence":"1","token":"file"},{"dictionary":"simple","sequence":"1","token":"float"},{"dictionary":"simple","sequence":"1","token":"host"},{"dictionary":"tamil_stem","sequence":"1","token":"hword"},{"dictionary":"tamil_stem","sequence":"1","token":"hword_asciipart"},{"dictionary":"simple","sequence":"1","token":"hword_numpart"},{"dictionary":"tamil_stem","sequence":"1","token":"hword_part"},{"dictionary":"simple","sequence":"1","token":"int"},{"dictionary":"simple","sequence":"1","token":"numhword"},{"dictionary":"simple","sequence":"1","token":"numword"},{"dictionary":"simple","sequence":"1","token":"sfloat"},{"dictionary":"simple","sequence":"1","token":"uint"},{"dictionary":"simple","sequence":"1","token":"url"},{"dictionary":"simple","sequence":"1","token":"url_path"},{"dictionary":"simple","sequence":"1","token":"version"},{"dictionary":"tamil_stem","sequence":"1","token":"word"}],"parser":"default"},"comparison_hash":"90728ba2381331c63b0e06a50121fc96999238ee9674bdfef1024bcbbd5961d2","description":["Text search configuration tamil."],"description_zh":"全文搜索配置 tamil。","description_zh_html":"\u003cp\u003e全文搜索配置 tamil。\u003c/p\u003e\u003cdl\u003e\u003cdt\u003e解析器\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003edefault\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e配置\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003etamil\u003c/code\u003e\u003c/dd\u003e\u003c/dl\u003e\u003ch3\u003e词元与词典映射\u003c/h3\u003e\u003ctable\u003e\u003ctr\u003e\u003cth\u003e词元类型\u003c/th\u003e\u003cth\u003e顺序\u003c/th\u003e\u003cth\u003e词典\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eemail\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eurl\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eurl_path\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ehost\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efile\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eversion\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003esfloat\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003efloat\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eint\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003euint\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003enumword\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ehword_numpart\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003enumhword\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esimple\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003easciiword\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003etamil_stem\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ehword_asciipart\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003etamil_stem\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003easciihword\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003etamil_stem\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003eword\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003etamil_stem\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ehword_part\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003etamil_stem\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003ccode\u003ehword\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003e1\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e\u003ccode\u003etamil_stem\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003ch3\u003e同版本中文手册节选\u003c/h3\u003e\u003cp\u003e\n    一个文本检索配置指定了将一个文档转换成一个 \u003ccode class=\"type\"\u003etsvector\u003c/code\u003e 所需的所有选项：用于把文本分解成词元的解析器，以及用于将每一个词元转换成词位的词典。每一次 \u003ccode class=\"function\"\u003eto_tsvector\u003c/code\u003e 或 \u003ccode class=\"function\"\u003eto_tsquery\u003c/code\u003e 的调用都需要一个文本检索配置来执行其处理。配置参数 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-client.html#GUC-DEFAULT-TEXT-SEARCH-CONFIG\"\u003edefault_text_search_config\u003c/a\u003e 指定了默认配置的名称，如果省略了显式的配置参数，文本检索函数将会使用它。它可以在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 中设置，或者使用 \u003ccode class=\"command\"\u003eSET\u003c/code\u003e 命令为一个单独的会话设置。\n   \u003c/p\u003e\u003cp\u003e\n    有一些预定义的文本检索配置可用，并且你可以容易地创建自定义的配置。为了便于管理文本检索对象，可以使用一组 \u003cacronym class=\"acronym\"\u003eSQL\u003c/acronym\u003e 命令，并且有多个 \u003cspan class=\"application\"\u003epsql\u003c/span\u003e 命令可以显示有关文本检索对象（\u003ca class=\"xref\" href=\"/zh/docs/18/textsearch-psql.html\"\u003e第 12.10 节\u003c/a\u003e）的信息。\n   \u003c/p\u003e\u003cp\u003e\n    作为一个示例，我们将创建一个配置 \u003ccode class=\"literal\"\u003epg\u003c/code\u003e，从复制内置的 \u003ccode class=\"literal\"\u003eenglish\u003c/code\u003e 配置开始：\n\n\u003c/p\u003e\u003cp\u003e\n    我们将使用一个 PostgreSQL 相关的同义词列表，并将它存储在 \u003ccode class=\"filename\"\u003e$SHAREDIR/tsearch_data/pg_dict.syn\u003c/code\u003e 中。文件内容看起来像：\n\n\u003c/p\u003e\u003cp\u003e\u003ca href=\"/zh/docs/18/textsearch-configuration.html\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","facts":[{"label":"Configuration","value":"tamil"},{"label":"Parser","value":"default"}],"facts_zh":[{"label":"配置","value":"tamil"},{"label":"解析器","value":"默认"}],"manual_html":"\u003cdiv class=\"sect1\" id=\"TEXTSEARCH-CONFIGURATION\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e12.7. Configuration Example \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eA text search configuration specifies all options necessary to transform a document into a \u003ccode class=\"type\"\u003etsvector\u003c/code\u003e: the parser to use to break text into tokens, and the dictionaries to use to transform each token into a lexeme. Every call of \u003ccode class=\"function\"\u003eto_tsvector\u003c/code\u003e or \u003ccode class=\"function\"\u003eto_tsquery\u003c/code\u003e needs a text search configuration to perform its processing. The configuration parameter \u003ca class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-DEFAULT-TEXT-SEARCH-CONFIG\"\u003edefault_text_search_config\u003c/a\u003e specifies the name of the default configuration, which is the one used by text search functions if an explicit configuration parameter is omitted. It can be set in \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e, or set for an individual session using the \u003ccode class=\"command\"\u003eSET\u003c/code\u003e command.\u003c/p\u003e\n\u003cp\u003eSeveral predefined text search configurations are available, and you can create custom configurations easily. To facilitate management of text search objects, a set of SQL commands is available, and there are several \u003cspan class=\"application\"\u003epsql\u003c/span\u003e commands that display information about text search objects (\u003ca class=\"xref\" href=\"/docs/18/textsearch-psql.html\" title=\"12.10. psql Support\"\u003eSection 12.10\u003c/a\u003e).\u003c/p\u003e\n\u003cp\u003eAs an example we will create a configuration \u003ccode class=\"literal\"\u003epg\u003c/code\u003e, starting by duplicating the built-in \u003ccode class=\"literal\"\u003eenglish\u003c/code\u003e configuration:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH CONFIGURATION public.pg ( COPY = pg_catalog.english );\n\u003c/pre\u003e\n\u003cp\u003eWe will use a PostgreSQL-specific synonym list and store it in \u003ccode class=\"filename\"\u003e$SHAREDIR/tsearch_data/pg_dict.syn\u003c/code\u003e. The file contents look like:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003epostgres    pg\npgsql       pg\npostgresql  pg\n\u003c/pre\u003e\n\u003cp\u003eWe define the synonym dictionary like this:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH DICTIONARY pg_dict (\n    TEMPLATE = synonym,\n    SYNONYMS = pg_dict\n);\n\u003c/pre\u003e\n\u003cp\u003eNext we register the \u003cspan class=\"productname\"\u003eIspell\u003c/span\u003e dictionary \u003ccode class=\"literal\"\u003eenglish_ispell\u003c/code\u003e, which has its own configuration files:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH DICTIONARY english_ispell (\n    TEMPLATE = ispell,\n    DictFile = english,\n    AffFile = english,\n    StopWords = english\n);\n\u003c/pre\u003e\n\u003cp\u003eNow we can set up the mappings for words in configuration \u003ccode class=\"literal\"\u003epg\u003c/code\u003e:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH CONFIGURATION pg\n    ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,\n                      word, hword, hword_part\n    WITH pg_dict, english_ispell, english_stem;\n\u003c/pre\u003e\n\u003cp\u003eWe choose not to index or search some token types that the built-in configuration does handle:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH CONFIGURATION pg\n    DROP MAPPING FOR email, url, url_path, sfloat, float;\n\u003c/pre\u003e\n\u003cp\u003eNow we can test our configuration:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eSELECT * FROM ts_debug('public.pg', '\nPostgreSQL, the highly scalable, SQL compliant, open source object-relational\ndatabase management system, is now undergoing beta testing of the next\nversion of our software.\n');\n\u003c/pre\u003e\n\u003cp\u003eThe next step is to set the session to use the new configuration, which was created in the \u003ccode class=\"literal\"\u003epublic\u003c/code\u003e schema:\u003c/p\u003e\n\u003cpre class=\"screen\"\u003e=\u0026gt; \\dF\n   List of text search configurations\n Schema  | Name | Description\n---------+------+-------------\n public  | pg   |\n\nSET default_text_search_config = 'public.pg';\nSET\n\nSHOW default_text_search_config;\n default_text_search_config\n----------------------------\n public.pg\n\u003c/pre\u003e\n\u003c/div\u003e","manual_path":"/docs/18/textsearch-configuration.html","mappings":[{"dictionary":"simple","sequence":"1","token":"email"},{"dictionary":"simple","sequence":"1","token":"url"},{"dictionary":"simple","sequence":"1","token":"url_path"},{"dictionary":"simple","sequence":"1","token":"host"},{"dictionary":"simple","sequence":"1","token":"file"},{"dictionary":"simple","sequence":"1","token":"version"},{"dictionary":"simple","sequence":"1","token":"sfloat"},{"dictionary":"simple","sequence":"1","token":"float"},{"dictionary":"simple","sequence":"1","token":"int"},{"dictionary":"simple","sequence":"1","token":"uint"},{"dictionary":"simple","sequence":"1","token":"numword"},{"dictionary":"simple","sequence":"1","token":"hword_numpart"},{"dictionary":"simple","sequence":"1","token":"numhword"},{"dictionary":"tamil_stem","sequence":"1","token":"asciiword"},{"dictionary":"tamil_stem","sequence":"1","token":"hword_asciipart"},{"dictionary":"tamil_stem","sequence":"1","token":"asciihword"},{"dictionary":"tamil_stem","sequence":"1","token":"word"},{"dictionary":"tamil_stem","sequence":"1","token":"hword_part"},{"dictionary":"tamil_stem","sequence":"1","token":"hword"}],"related":[{"label":"default parser","url":"/wiki/fts/parser-default/?v=18"}],"release":{"catalog_fingerprint":"65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502","channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[{"code":"/*\n * text search configuration for tamil language\n *\n * Copyright (c) 2007-2025, PostgreSQL Global Development Group\n *\n * src/backend/snowball/snowball.sql.in\n *\n * tamil and certain other macros are replaced for each language;\n * see the Makefile for details.\n *\n * Note: this file is read in single-user -j mode, which means that the\n * command terminator is semicolon-newline-newline; whenever the backend\n * sees that, it stops and executes what it's got.  If you write a lot of\n * statements without empty lines between, they'll all get quoted to you\n * in any error message about one of them, so don't do that.  Also, you\n * cannot write a semicolon immediately followed by an empty line in a\n * string literal (including a function body!) or a multiline comment.\n */\n\nCREATE TEXT SEARCH DICTIONARY tamil_stem\n\t(TEMPLATE = snowball, Language = tamil );\n\nCOMMENT ON TEXT SEARCH DICTIONARY tamil_stem IS 'snowball stemmer for tamil language';\n\nCREATE TEXT SEARCH CONFIGURATION tamil\n\t(PARSER = default);\n\nCOMMENT ON TEXT SEARCH CONFIGURATION tamil IS 'configuration for tamil language';\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n\tFOR email, url, url_path, host, file, version,\n\t    sfloat, float, int, uint,\n\t    numword, hword_numpart, numhword\n\tWITH simple;\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n    FOR asciiword, hword_asciipart, asciihword\n\tWITH tamil_stem;\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n    FOR word, hword_part, hword\n\tWITH tamil_stem;","paragraphs":["Generated from this release’s Snowball language list and SQL template."],"title":"Generated initdb definition"}],"sections_zh":[{"code":"/*\n * text search configuration for tamil language\n *\n * Copyright (c) 2007-2025, PostgreSQL Global Development Group\n *\n * src/backend/snowball/snowball.sql.in\n *\n * tamil and certain other macros are replaced for each language;\n * see the Makefile for details.\n *\n * Note: this file is read in single-user -j mode, which means that the\n * command terminator is semicolon-newline-newline; whenever the backend\n * sees that, it stops and executes what it's got.  If you write a lot of\n * statements without empty lines between, they'll all get quoted to you\n * in any error message about one of them, so don't do that.  Also, you\n * cannot write a semicolon immediately followed by an empty line in a\n * string literal (including a function body!) or a multiline comment.\n */\n\nCREATE TEXT SEARCH DICTIONARY tamil_stem\n\t(TEMPLATE = snowball, Language = tamil );\n\nCOMMENT ON TEXT SEARCH DICTIONARY tamil_stem IS 'snowball stemmer for tamil language';\n\nCREATE TEXT SEARCH CONFIGURATION tamil\n\t(PARSER = default);\n\nCOMMENT ON TEXT SEARCH CONFIGURATION tamil IS 'configuration for tamil language';\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n\tFOR email, url, url_path, host, file, version,\n\t    sfloat, float, int, uint,\n\t    numword, hword_numpart, numhword\n\tWITH simple;\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n    FOR asciiword, hword_asciipart, asciihword\n\tWITH tamil_stem;\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n    FOR word, hword_part, hword\n\tWITH tamil_stem;","paragraphs":["根据此版本的 Snowball 语言列表和 SQL 模板生成。"],"title":"initdb 生成的定义"}],"signature":"","sources":[{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18 English manual","path":"textsearch-configuration.html","sha256":"7957c03871a5f267f642ec609b2e3d1404eb000ccdef21ca0d1d8a8616110dc9","url":"/docs/18/textsearch-configuration.html"}],"tables":[{"columns":[{"key":"token","label":"Token type"},{"key":"sequence","label":"Order"},{"key":"dictionary","label":"Dictionary"}],"key":"mappings","rows":[{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"email"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"url"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"url_path"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"host"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"file"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"version"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"sfloat"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"float"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"int"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"uint"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"numword"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"hword_numpart"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"numhword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"asciiword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword_asciipart"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"asciihword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"word"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword_part"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword"}],"title":"Token-to-dictionary mappings"}],"tables_zh":[{"columns":[{"key":"token","label":"词元类型"},{"key":"sequence","label":"顺序"},{"key":"dictionary","label":"词典"}],"key":"mappings","rows":[{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"email"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"url"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"url_path"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"host"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"file"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"version"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"sfloat"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"float"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"int"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"uint"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"numword"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"hword_numpart"},{"dictionary":{"text":"简单","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"numhword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"asciiword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword_asciipart"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"asciihword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"word"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword_part"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword"}],"title":"词元到词典的映射"}],"zh_from":{"authored_translation":"source-derived-structured-summary","body_sha256":"ac12e70de481e9c4f61fcc6a577dcaee1043f9f9a437cba8a01de4561870d4ee","kind":"same-version-chinese-manual-with-source-derived-structured-summary","manual":{"anchor":"","build_id":107,"extraction":"concept-introduction","fragment_sha256":"45987985da02c9a2ca94654bb013bda6e9aede523cb42f9e5c1aa248847aa11f","locale":"zh-Hans","page_key":"textsearch-configuration.html","source_hash":"fcc0bb39dbc241b21e9a05ac2d71f8c5c41034675909cd19d305cf07d445d9e5","source_revision":"unknown:rendered-translation-baseline","translated_from_revision":null,"translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","url":"/zh/docs/18/textsearch-configuration.html","version":"18"},"runtime_rerun":false,"source_facts_revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}},"ManualEvidence":{"manual_path":"/docs/18/textsearch-configuration.html","release":{"catalog_fingerprint":"65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502","channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18 English manual","path":"textsearch-configuration.html","sha256":"7957c03871a5f267f642ec609b2e3d1404eb000ccdef21ca0d1d8a8616110dc9","url":"/docs/18/textsearch-configuration.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"fts","Key":"configuration-tamil","SourceDatabase":"center","Version":"18","Locale":"en","Title":"tamil","Summary":"Text search configuration tamil.","BodyHTML":"\u003cdiv id=\"TEXTSEARCH-CONFIGURATION\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2\u003e12.7. Configuration Example \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eA text search configuration specifies all options necessary to transform a document into a \u003ccode\u003etsvector\u003c/code\u003e: the parser to use to break text into tokens, and the dictionaries to use to transform each token into a lexeme. Every call of \u003ccode\u003eto_tsvector\u003c/code\u003e or \u003ccode\u003eto_tsquery\u003c/code\u003e needs a text search configuration to perform its processing. The configuration parameter \u003ca href=\"/docs/18/runtime-config-client.html#GUC-DEFAULT-TEXT-SEARCH-CONFIG\" rel=\"nofollow\"\u003edefault_text_search_config\u003c/a\u003e specifies the name of the default configuration, which is the one used by text search functions if an explicit configuration parameter is omitted. It can be set in \u003ccode\u003epostgresql.conf\u003c/code\u003e, or set for an individual session using the \u003ccode\u003eSET\u003c/code\u003e command.\u003c/p\u003e\n\u003cp\u003eSeveral predefined text search configurations are available, and you can create custom configurations easily. To facilitate management of text search objects, a set of SQL commands is available, and there are several \u003cspan\u003epsql\u003c/span\u003e commands that display information about text search objects (\u003ca href=\"/docs/18/textsearch-psql.html\" rel=\"nofollow\"\u003eSection 12.10\u003c/a\u003e).\u003c/p\u003e\n\u003cp\u003eAs an example we will create a configuration \u003ccode\u003epg\u003c/code\u003e, starting by duplicating the built-in \u003ccode\u003eenglish\u003c/code\u003e configuration:\u003c/p\u003e\n\u003cpre\u003eCREATE TEXT SEARCH CONFIGURATION public.pg ( COPY = pg_catalog.english );\n\u003c/pre\u003e\n\u003cp\u003eWe will use a PostgreSQL-specific synonym list and store it in \u003ccode\u003e$SHAREDIR/tsearch_data/pg_dict.syn\u003c/code\u003e. The file contents look like:\u003c/p\u003e\n\u003cpre\u003epostgres    pg\npgsql       pg\npostgresql  pg\n\u003c/pre\u003e\n\u003cp\u003eWe define the synonym dictionary like this:\u003c/p\u003e\n\u003cpre\u003eCREATE TEXT SEARCH DICTIONARY pg_dict (\n    TEMPLATE = synonym,\n    SYNONYMS = pg_dict\n);\n\u003c/pre\u003e\n\u003cp\u003eNext we register the \u003cspan\u003eIspell\u003c/span\u003e dictionary \u003ccode\u003eenglish_ispell\u003c/code\u003e, which has its own configuration files:\u003c/p\u003e\n\u003cpre\u003eCREATE TEXT SEARCH DICTIONARY english_ispell (\n    TEMPLATE = ispell,\n    DictFile = english,\n    AffFile = english,\n    StopWords = english\n);\n\u003c/pre\u003e\n\u003cp\u003eNow we can set up the mappings for words in configuration \u003ccode\u003epg\u003c/code\u003e:\u003c/p\u003e\n\u003cpre\u003eALTER TEXT SEARCH CONFIGURATION pg\n    ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,\n                      word, hword, hword_part\n    WITH pg_dict, english_ispell, english_stem;\n\u003c/pre\u003e\n\u003cp\u003eWe choose not to index or search some token types that the built-in configuration does handle:\u003c/p\u003e\n\u003cpre\u003eALTER TEXT SEARCH CONFIGURATION pg\n    DROP MAPPING FOR email, url, url_path, sfloat, float;\n\u003c/pre\u003e\n\u003cp\u003eNow we can test our configuration:\u003c/p\u003e\n\u003cpre\u003eSELECT * FROM ts_debug(\u0026#39;public.pg\u0026#39;, \u0026#39;\nPostgreSQL, the highly scalable, SQL compliant, open source object-relational\ndatabase management system, is now undergoing beta testing of the next\nversion of our software.\n\u0026#39;);\n\u003c/pre\u003e\n\u003cp\u003eThe next step is to set the session to use the new configuration, which was created in the \u003ccode\u003epublic\u003c/code\u003e schema:\u003c/p\u003e\n\u003cpre\u003e=\u0026gt; \\dF\n   List of text search configurations\n Schema  | Name | Description\n---------+------+-------------\n public  | pg   |\n\nSET default_text_search_config = \u0026#39;public.pg\u0026#39;;\nSET\n\nSHOW default_text_search_config;\n default_text_search_config\n----------------------------\n public.pg\n\u003c/pre\u003e\n\u003c/div\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"028c4fd2311ca48158871e5f49250e16d46be8b7137d0e56d7948ae9c1fa2ef1","Payload":{"description":["Text search configuration tamil."],"manual_html":"\u003cdiv class=\"sect1\" id=\"TEXTSEARCH-CONFIGURATION\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003e12.7. Configuration Example \u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eA text search configuration specifies all options necessary to transform a document into a \u003ccode class=\"type\"\u003etsvector\u003c/code\u003e: the parser to use to break text into tokens, and the dictionaries to use to transform each token into a lexeme. Every call of \u003ccode class=\"function\"\u003eto_tsvector\u003c/code\u003e or \u003ccode class=\"function\"\u003eto_tsquery\u003c/code\u003e needs a text search configuration to perform its processing. The configuration parameter \u003ca class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-DEFAULT-TEXT-SEARCH-CONFIG\"\u003edefault_text_search_config\u003c/a\u003e specifies the name of the default configuration, which is the one used by text search functions if an explicit configuration parameter is omitted. It can be set in \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e, or set for an individual session using the \u003ccode class=\"command\"\u003eSET\u003c/code\u003e command.\u003c/p\u003e\n\u003cp\u003eSeveral predefined text search configurations are available, and you can create custom configurations easily. To facilitate management of text search objects, a set of SQL commands is available, and there are several \u003cspan class=\"application\"\u003epsql\u003c/span\u003e commands that display information about text search objects (\u003ca class=\"xref\" href=\"/docs/18/textsearch-psql.html\" title=\"12.10. psql Support\"\u003eSection 12.10\u003c/a\u003e).\u003c/p\u003e\n\u003cp\u003eAs an example we will create a configuration \u003ccode class=\"literal\"\u003epg\u003c/code\u003e, starting by duplicating the built-in \u003ccode class=\"literal\"\u003eenglish\u003c/code\u003e configuration:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH CONFIGURATION public.pg ( COPY = pg_catalog.english );\n\u003c/pre\u003e\n\u003cp\u003eWe will use a PostgreSQL-specific synonym list and store it in \u003ccode class=\"filename\"\u003e$SHAREDIR/tsearch_data/pg_dict.syn\u003c/code\u003e. The file contents look like:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003epostgres    pg\npgsql       pg\npostgresql  pg\n\u003c/pre\u003e\n\u003cp\u003eWe define the synonym dictionary like this:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH DICTIONARY pg_dict (\n    TEMPLATE = synonym,\n    SYNONYMS = pg_dict\n);\n\u003c/pre\u003e\n\u003cp\u003eNext we register the \u003cspan class=\"productname\"\u003eIspell\u003c/span\u003e dictionary \u003ccode class=\"literal\"\u003eenglish_ispell\u003c/code\u003e, which has its own configuration files:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eCREATE TEXT SEARCH DICTIONARY english_ispell (\n    TEMPLATE = ispell,\n    DictFile = english,\n    AffFile = english,\n    StopWords = english\n);\n\u003c/pre\u003e\n\u003cp\u003eNow we can set up the mappings for words in configuration \u003ccode class=\"literal\"\u003epg\u003c/code\u003e:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH CONFIGURATION pg\n    ALTER MAPPING FOR asciiword, asciihword, hword_asciipart,\n                      word, hword, hword_part\n    WITH pg_dict, english_ispell, english_stem;\n\u003c/pre\u003e\n\u003cp\u003eWe choose not to index or search some token types that the built-in configuration does handle:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eALTER TEXT SEARCH CONFIGURATION pg\n    DROP MAPPING FOR email, url, url_path, sfloat, float;\n\u003c/pre\u003e\n\u003cp\u003eNow we can test our configuration:\u003c/p\u003e\n\u003cpre class=\"programlisting\"\u003eSELECT * FROM ts_debug('public.pg', '\nPostgreSQL, the highly scalable, SQL compliant, open source object-relational\ndatabase management system, is now undergoing beta testing of the next\nversion of our software.\n');\n\u003c/pre\u003e\n\u003cp\u003eThe next step is to set the session to use the new configuration, which was created in the \u003ccode class=\"literal\"\u003epublic\u003c/code\u003e schema:\u003c/p\u003e\n\u003cpre class=\"screen\"\u003e=\u0026gt; \\dF\n   List of text search configurations\n Schema  | Name | Description\n---------+------+-------------\n public  | pg   |\n\nSET default_text_search_config = 'public.pg';\nSET\n\nSHOW default_text_search_config;\n default_text_search_config\n----------------------------\n public.pg\n\u003c/pre\u003e\n\u003c/div\u003e","related":[{"label":"default parser","url":"/wiki/fts/parser-default/?v=18"}],"sections":[{"code":"/*\n * text search configuration for tamil language\n *\n * Copyright (c) 2007-2025, PostgreSQL Global Development Group\n *\n * src/backend/snowball/snowball.sql.in\n *\n * tamil and certain other macros are replaced for each language;\n * see the Makefile for details.\n *\n * Note: this file is read in single-user -j mode, which means that the\n * command terminator is semicolon-newline-newline; whenever the backend\n * sees that, it stops and executes what it's got.  If you write a lot of\n * statements without empty lines between, they'll all get quoted to you\n * in any error message about one of them, so don't do that.  Also, you\n * cannot write a semicolon immediately followed by an empty line in a\n * string literal (including a function body!) or a multiline comment.\n */\n\nCREATE TEXT SEARCH DICTIONARY tamil_stem\n\t(TEMPLATE = snowball, Language = tamil );\n\nCOMMENT ON TEXT SEARCH DICTIONARY tamil_stem IS 'snowball stemmer for tamil language';\n\nCREATE TEXT SEARCH CONFIGURATION tamil\n\t(PARSER = default);\n\nCOMMENT ON TEXT SEARCH CONFIGURATION tamil IS 'configuration for tamil language';\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n\tFOR email, url, url_path, host, file, version,\n\t    sfloat, float, int, uint,\n\t    numword, hword_numpart, numhword\n\tWITH simple;\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n    FOR asciiword, hword_asciipart, asciihword\n\tWITH tamil_stem;\n\nALTER TEXT SEARCH CONFIGURATION tamil ADD MAPPING\n    FOR word, hword_part, hword\n\tWITH tamil_stem;","paragraphs":["Generated from this release’s Snowball language list and SQL template."],"title":"Generated initdb definition"}],"tables":[{"columns":[{"key":"token","label":"Token type"},{"key":"sequence","label":"Order"},{"key":"dictionary","label":"Dictionary"}],"key":"mappings","rows":[{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"email"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"url"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"url_path"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"host"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"file"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"version"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"sfloat"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"float"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"int"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"uint"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"numword"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"hword_numpart"},{"dictionary":{"text":"simple","url":"/wiki/fts/dictionary-simple/?v=18"},"sequence":"1","token":"numhword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"asciiword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword_asciipart"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"asciihword"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"word"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword_part"},{"dictionary":{"text":"tamil_stem","url":"/wiki/fts/dictionary-tamil_stem/?v=18"},"sequence":"1","token":"hword"}],"title":"Token-to-dictionary mappings"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
