postgresql_16:9.6.14.1 Configuration
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > dict_xsyn — example synonym full-text search dictionary > Configuration
A dict_xsyn dictionary accepts the following options:
matchorigcontrols whether the original word is accepted by the dictionary. Default istrue.matchsynonymscontrols whether the synonyms are accepted by the dictionary. Default isfalse.keeporigcontrols whether the original word is included in the dictionary's output. Default istrue.keepsynonymscontrols whether the synonyms are included in the dictionary's output. Default istrue.rulesis the base name of the file containing the list of synonyms. This file must be stored in$SHAREDIR/tsearch_data/(where$SHAREDIRmeans the PostgreSQL installation's shared-data directory). Its name must end in.rules(which is not to be included in therulesparameter).
The rules file has the following format:
- Each line represents a group of synonyms for a single word, which is given first on the line. Synonyms are separated by whitespace, thus: word syn1 syn2 syn3
- The sharp (
#) sign is a comment delimiter. It may appear at any position in a line. The rest of the line will be skipped.
Look at xsyn_sample.rules, which is installed in $SHAREDIR/tsearch_data/, for an example.