CREATE_TEXT_SEARCH_DICTIONARY(7)

โœจ CREATE_TEXT_SEARCH_DICTIONARY โœจ

okay bestie, welcome to the CREATE_TEXT_SEARCH_DICTIONARY(7) page ๐Ÿ’– this is a PostgreSQL 18.6 documentation moment, and we're gonna make a whole new text search dictionary. no cap.


๐ŸŒธ NAME ๐ŸŒธ

CREATE_TEXT_SEARCH_DICTIONARY โ€” define a new text search dictionary ๐Ÿซถ


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

CREATE TEXT SEARCH DICTIONARY name (
    TEMPLATE = template
    [, option = value [, ... ]]
)

like, that's the whole shape of it. cute, right? ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so CREATE TEXT SEARCH DICTIONARY literally creates a brand new text search dictionary. and what even is a text search dictionary, you ask? it's the thing that specifies a way of recognizing interesting or uninteresting words for searching ๐Ÿ” like, it's the vibe-checker for your words.

a dictionary depends on a text search template, and that template is what specifies the functions that actually perform the work. the dictionary is kinda the main character handing over the aesthetic, and the template is the one doing the heavy lifting behind the scenes. typically the dictionary provides some options that control the detailed behavior of the template's functions.

if a schema name is given, then the text search dictionary gets created in that specified schema. otherwise? it's created in the current schema. simple as that โœจ

the user who defines a text search dictionary becomes its owner ๐Ÿ‘‘ you made it, you own it, periodt.

refer to Chapter 12 for further information, if you wanna go deeper, iykyk.


๐Ÿ’– PARAMETERS ๐Ÿ’–

  • name โ€” the name of the text search dictionary to be created. and yes, the name can be schema-qualified ๐ŸŽ€
  • template โ€” the name of the text search template that will define the basic behavior of this dictionary. this is the blueprint, the foundational vibe.
  • option โ€” the name of a template-specific option to be set for this dictionary. each template has its own lil set of knobs to turn.
  • value โ€” the value to use for a template-specific option. if the value is not a simple identifier or number, it must be quoted (but honestly you can always quote it, if you wish โ€” no one's gonna stop you ๐Ÿ’…).

and the options can appear in any order. any order!! go wild, bestie ๐ŸŒˆ


๐ŸŒŸ EXAMPLES ๐ŸŒŸ

okay so this next example command creates a Snowball-based dictionary with a nonstandard list of stop words. it's giving very multilingual of her:

CREATE TEXT SEARCH DICTIONARY my_russian (
    template = snowball,
    language = russian,
    stopwords = myrussian
);

ate. no crumbs. ๐Ÿ”ฅ


๐Ÿ’€ COMPATIBILITY ๐Ÿ’€

there is no CREATE TEXT SEARCH DICTIONARY statement in the SQL standard ๐Ÿ˜ญ like, this is a PostgreSQL exclusive, the standard simply does not have it. not our problem fr fr.


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


and that's the whole page, bestie!! ๐Ÿฆ‹ this was PostgreSQL 18.6, dated 2026, and the page is CREATE TEXT SEARCH DICTIONARY(7) โ€” now go forth and define your dictionaries, you absolute icon ๐Ÿ’œโœจ