F.7. dict_xsyn

The Extended Synonym Dictionary module replaces words with groups of their synonyms, and so makes it possible to search for a word using any of its synonyms.

F.7.1. Configuration

A dict_xsyn dictionary accepts the following options:

The rules file has the following format:

Look at xsyn_sample.rules, which is installed in $(prefix)/share/tsearch_data/, for an example.

F.7.2. Usage

mydb=# SELECT ts_lexize('xsyn','word');
ts_lexize
----------------
{word,syn1,syn2,syn3)
  

Change dictionary options:

mydb# ALTER TEXT SEARCH DICTIONARY xsyn (KEEPORIG=false);
ALTER TEXT SEARCH DICTIONARY