Closed msievers closed 10 years ago
foo=# CREATE TEXT SEARCH DICTIONARY german_ispell (TEMPLATE = ispell, dictfile = de_DE_frami,afffile = de_DE_frami,StopWords = german);
ERROR: could not open dictionary file "/usr/share/postgresql/9.3/tsearch_data/de_de_frami.dict": No such file or directory
/usr/share/postgresql/9.3/tsearch_data$ sudo mv de_DE_frami.dict de_de_frami.dict
foo=# CREATE TEXT SEARCH DICTIONARY german_ispell (TEMPLATE = ispell, dictfile = de_DE_frami,afffile = de_DE_frami,StopWords = german);
ERROR: could not open affix file "/usr/share/postgresql/9.3/tsearch_data/de_de_frami.affix": No such file or directory
/usr/share/postgresql/9.3/tsearch_data$ sudo mv de_DE_frami.affix de_de_frami.affix
foo=# CREATE TEXT SEARCH DICTIONARY german_ispell (TEMPLATE = ispell, dictfile = de_DE_frami,afffile = de_DE_frami,StopWords = german);
CREATE TEXT SEARCH DICTIONARY
Wie man sieht, schnallt Postgres es nicht, wenn die Dateien da sind, aber z.B. de_DE_
heißen, obwohl man im SQL Statement de_DE_
geschrieben hat.
Es hilft, die Dateinamen komplett zu downcasen.
Thank you, but dictionaries are also gone now.
tl;dr;
Lowercase filenames of the ispell dictionaires, because postgres does not find them with uppercased parts. Tested on ubuntu 14.04.
Details
In
etikett/db/migrate
there are two dictionary files namedde_DE_frami.affix
de_DE_frami.dict
The corresponding migration which depends on these files beeing copied to `#{pg_config --sharedir}" has this sql statement
execute("CREATE TEXT SEARCH DICTIONARY german_ispell (TEMPLATE = ispell, dictfile = de_DE_frami,afffile = de_DE_frami,StopWords = german);")
Issueing this command with
psql
on a database named foo gives an error, saying the the dictionary files cannot be found, although they are in place.