CREATE TEXT SEARCH DICTIONARY

Function

CREATE TEXT SEARCH DICTIONARY creates a full-text search dictionary. A dictionary is used to identify and process specified words during full-text search.

Dictionaries are created by using predefined templates (defined in the PG_TS_TEMPLATE system catalog). Five types of dictionaries can be created, Simple, Ispell, Synonym, Thesaurus, and Snowball. Each type of dictionaries is used to handle different tasks.

Precautions

Syntax

1
2
3
4
CREATE TEXT SEARCH DICTIONARY name (
    TEMPLATE = template
    [, option = value [, ... ]]
);

Parameter Description

Examples

Create an Ispell dictionary english_ispell (the dictionary definition file is from the open source dictionary).
1
2
3
4
5
6
7
CREATE TEXT SEARCH DICTIONARY english_ispell (
    TEMPLATE = ispell,
    DictFile = english,
    AffFile = english,
    StopWords = english,
    FilePath = 'obs://bucket_name/path accesskey=ak secretkey=sk region=rg' 
);

See examples in Configuration Examples.

Helpful Links

ALTER TEXT SEARCH DICTIONARY, DROP TEXT SEARCH DICTIONARY