ALTER TEXT SEARCH DICTIONARY
Function
Modifies the definition of a full-text retrieval dictionary, including its parameters, name, owner, and schema.
Precautions
- ALTER is not supported by predefined dictionaries.
- Only the owner of a dictionary can do ALTER to the dictionary. System administrators have this permission by default.
- After a dictionary is created or modified, any modification to the user-defined dictionary definition file in the directory specified by FilePath will not affect the dictionary in the database. To make such modifications take effect in the dictionary in the database, run the ALTER TEXT SEARCH DICTIONARY statement to update the definition file of the dictionary.
Syntax
- Modify the dictionary definition.
1
ALTER TEXT SEARCH DICTIONARY name ( option = value | option [, ...] );
- Rename a dictionary.
1
ALTER TEXT SEARCH DICTIONARY name RENAME TO new_name;
- Set the schema of a dictionary.
1
ALTER TEXT SEARCH DICTIONARY name SET SCHEMA new_schema;
- Change the owner of a dictionary.
1
ALTER TEXT SEARCH DICTIONARY name OWNER TO new_owner;
Parameter Description
Parameter |
Description |
Value Range |
---|---|---|
name |
Specifies the name of the full-text search dictionary to be modified, which can include a schema. |
Name of a valid full-text search dictionary. |
option |
Specifies the parameter name of the full-text search dictionary specific option to be modified. Each type of dictionaries has a template containing their custom parameters. Parameters function in a way irrelevant to their setting sequence.
|
For details about the parameters, see the option parameter in Table 1. |
value |
Specifies the new value of a parameter. If = and value are omitted, the previous settings of the parameter will be deleted and the default value will be used. |
Corresponding option definition. |
new_name |
Specifies the new name of the full-text search dictionary. |
A string compliant with the identifier naming rules. |
new_owner |
Specifies the new owner of the full-text search dictionary. |
Valid username. |
new_schema |
Specifies the new schema of the full-text search dictionary. |
Valid schema name. |
Examples
Create a full-text search dictionary my_dict.
1 2 3 4 5 |
CREATE TEXT SEARCH DICTIONARY my_dict ( TEMPLATE = snowball, Language = english, StopWords = english ); |
Change the Language setting for the full-text search dictionary my_dict and remove the stop word definition.
1
|
ALTER TEXT SEARCH DICTIONARY my_dict (Language = dutch,StopWords); |
Update the definition of the full-text search dictionary my_dict without changing any content.
1
|
ALTER TEXT SEARCH DICTIONARY my_dict (dummy); |
Helpful Links
CREATE TEXT SEARCH DICTIONARY and DROP TEXT SEARCH DICTIONARY
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot