{"Entry":{"collection":"fts","key":"configuration-danish","name":"danish","aliases":[],"metadata":{"aliases":[],"category":"Configurations","content_hash":"136d5d9445500f6fe91a86662beeadb5506c52bcfddd7d44abca509a962ef76c","imported_at":"2026-09-30T00:40:47.193466+08:00","name":"danish","name_zh":"","slug":"configuration-danish","summary":"Text search configuration danish."}},"Definition":{"Collection":"fts","Key":"configuration-danish","SourceDatabase":"center","Version":"18","SourceTable":"text_search_component","SourceKey":"configuration-danish","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"aliases":[],"attributes":{"configuration":"danish","parser":"default"},"comparison_data":{"mappings":[{"dictionary":"danish_stem","sequence":"1","token":"asciihword"},{"dictionary":"danish_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":"danish_stem","sequence":"1","token":"hword"},{"dictionary":"danish_stem","sequence":"1","token":"hword_asciipart"},{"dictionary":"simple","sequence":"1","token":"hword_numpart"},{"dictionary":"danish_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":"danish_stem","sequence":"1","token":"word"}],"parser":"default"},"comparison_hash":"ebdc194b07a65aaa201c3cfb2282e2dc85799affea06023b19a823f8c15cf889","description":["Text search configuration danish."],"facts":[{"label":"Configuration","value":"danish"},{"label":"Parser","value":"default"}],"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":"danish_stem","sequence":"1","token":"asciiword"},{"dictionary":"danish_stem","sequence":"1","token":"hword_asciipart"},{"dictionary":"danish_stem","sequence":"1","token":"asciihword"},{"dictionary":"danish_stem","sequence":"1","token":"word"},{"dictionary":"danish_stem","sequence":"1","token":"hword_part"},{"dictionary":"danish_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 danish language\n *\n * Copyright (c) 2007-2025, PostgreSQL Global Development Group\n *\n * src/backend/snowball/snowball.sql.in\n *\n * danish 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 danish_stem\n\t(TEMPLATE = snowball, Language = danish , StopWords=danish);\n\nCOMMENT ON TEXT SEARCH DICTIONARY danish_stem IS 'snowball stemmer for danish language';\n\nCREATE TEXT SEARCH CONFIGURATION danish\n\t(PARSER = default);\n\nCOMMENT ON TEXT SEARCH CONFIGURATION danish IS 'configuration for danish language';\n\nALTER TEXT SEARCH CONFIGURATION danish 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 danish ADD MAPPING\n    FOR asciiword, hword_asciipart, asciihword\n\tWITH danish_stem;\n\nALTER TEXT SEARCH CONFIGURATION danish ADD MAPPING\n    FOR word, hword_part, hword\n\tWITH danish_stem;","paragraphs":["Generated from this release’s Snowball language list and SQL template."],"title":"Generated initdb definition"}],"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":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"asciiword"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"hword_asciipart"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"asciihword"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"word"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"hword_part"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"hword"}],"title":"Token-to-dictionary mappings"}]},"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-danish","SourceDatabase":"center","Version":"18","Locale":"en","Title":"danish","Summary":"Text search configuration danish.","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":"cf32931fe721af904358c66c125f2dfd9ee53f422609c0ebff72169cc487717f","Payload":{"description":["Text search configuration danish."],"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 danish language\n *\n * Copyright (c) 2007-2025, PostgreSQL Global Development Group\n *\n * src/backend/snowball/snowball.sql.in\n *\n * danish 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 danish_stem\n\t(TEMPLATE = snowball, Language = danish , StopWords=danish);\n\nCOMMENT ON TEXT SEARCH DICTIONARY danish_stem IS 'snowball stemmer for danish language';\n\nCREATE TEXT SEARCH CONFIGURATION danish\n\t(PARSER = default);\n\nCOMMENT ON TEXT SEARCH CONFIGURATION danish IS 'configuration for danish language';\n\nALTER TEXT SEARCH CONFIGURATION danish 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 danish ADD MAPPING\n    FOR asciiword, hword_asciipart, asciihword\n\tWITH danish_stem;\n\nALTER TEXT SEARCH CONFIGURATION danish ADD MAPPING\n    FOR word, hword_part, hword\n\tWITH danish_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":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"asciiword"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"hword_asciipart"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"asciihword"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"word"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"hword_part"},{"dictionary":{"text":"danish_stem","url":"/wiki/fts/dictionary-danish_stem/?v=18"},"sequence":"1","token":"hword"}],"title":"Token-to-dictionary mappings"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
