CREATE TEXT SEARCH CONFIGURATION creates a text search configuration. A text search configuration specifies a text search parser that can divide a string into tokens, plus dictionaries that can be used to determine which tokens are of interest for searching.
1 2 3 | CREATE TEXT SEARCH CONFIGURATION name ( PARSER = parser_name | COPY = source_config ) [ WITH ( {configuration_option = value} [, ...] )]; |
Specifies the name of the text search configuration to be created. Specifies the name can be schema-qualified.
Specifies the name of the text search parser to use for this configuration.
Specifies the name of an existing text search configuration to copy.
Specifies the configuration parameter of text search configuration is mainly for the parser executed by parser_name or contained by source_config.
Parser |
Parameters for adding an account |
Description |
Value Range |
---|---|---|---|
ngram |
gram_size |
Length of word segmentation |
Integer, 1 to 4 Default value: 2 |
punctuation_ignore |
Whether to ignore punctuations |
|
|
grapsymbol_ignore |
Whether to ignore graphical characters |
|
|
zhparser |
punctuation_ignore |
Whether to ignore special characters including punctuations (\r and \n will not be ignored) in the word segmentation result |
|
seg_with_duality |
Whether to aggregate segments with duality |
|
|
multi_short |
Whether to execute long words composite divide |
|
|
multi_duality |
Whether to aggregate segments in long words with duality |
|
|
multi_zmain |
Whether to display key single words individually |
|
|
multi_zall |
Whether to display all single words individually. |
|
Create a text search configuration.
1 | CREATE TEXT SEARCH CONFIGURATION ngram1 (parser=ngram) WITH (gram_size = 2, grapsymbol_ignore = false); |
Create a text search configuration.
1 | CREATE TEXT SEARCH CONFIGURATION ngram2 (copy=ngram1) WITH (gram_size = 2, grapsymbol_ignore = false); |
Create a text search configuration.
1 | CREATE TEXT SEARCH CONFIGURATION english_1 (parser=default); |