All Products
Search
Document Center

PolarDB:CREATE TEXT SEARCH DICTIONARY

Last Updated:Mar 28, 2026

Creates a text search dictionary.

Synopsis

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

Description

A text search dictionary defines how the search engine recognizes and classifies tokens — marking some as meaningful and others (such as stop words) as ignorable. Each dictionary is backed by a text search template, which provides the underlying functions. The dictionary's options control the detailed behavior of those functions.

If you include a schema name, the dictionary is created in that schema. Otherwise, it is created in the current schema. The user who creates the dictionary becomes its owner.

Note

Options can appear in any order.

Parameters

ParameterDescription
nameThe name of the dictionary to create. The name can be schema-qualified.
templateThe text search template that defines the dictionary's behavior.
optionA template-specific option name.
valueThe value for the option. Quote the value if it is not a simple identifier or number.

Examples

Create a Snowball-based dictionary for Russian with a nonstandard list of stop words:

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