skip to Main Content

I want to create a new text search dictionary for PostgreSQL that will perform the recognition of synonyms. The dictionary should use .syn file. I created file in TextEdit with synonyms and saved .syn file on desktop. After that I tried to run next block of code in pgAdmin4

CREATE TEXT SEARCH DICTIONARY xy
( TEMPLATE = synonym,
SYNONYMS = 'xy.syn');

But I get ERROR: invalid text search configuration file name "xy.syn"
SQL state: 22023

I can’t find out what am I doing wrong? Do I have to save .syn file somewhere else or is there any way to create some kind of file with synonyms inside pgAdmin4? I am using macbook air m1

2

Answers


  1. Chosen as BEST ANSWER

    Problem solved with saving .syn file from vscode.


  2. If the synonym file is called xy.syn, you should use SYNONYMS = 'xy' in your definition.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search