Trying to get good TEXT SEARCH results out of PostgreSQL in English, German and Dutch made that I downloaded proofing tools of LibreOffice (tried of version 4.3 and 3.3) and iSpell. I placed the files in the "tsearch_data" dir and renamed them so PostgreSQL would find them. I now have:
en_us.dict, en_us.affix, nl_nl.dict, nl_nl.affix, de_de_frami.dict, de_de_frami.affix
All of them give the same sort of errors while creating a dictionary in PostgreSQL 9.3 like so:
CREATE TEXT SEARCH DICTIONARY test_ispell (template = ispell, Dictfile = en_us, affFile = en_us, stopwords = english);
ERROR: wrong affix file format for flag CONTEXT: line 2428 of configuration file "/usr/share/postgresql/9.3/tsearch_data/en_us.affix": "COMPOUNDMIN 1" ERROR: wrong affix file format for flag CONTEXT: line 2533 of configuration file "/usr/share/postgresql/9.3/tsearch_data/en_us.affix": "SFX 123 N 1" ERROR: invalid byte sequence for encoding "UTF8": 0xc4 0x62 CONTEXT: line 18 of configuration file "/usr/share/postgresql/9.3/tsearch_data/de_de_frami.dict" ERROR: wrong affix file format for flag CONTEXT: line 604 of configuration file "/usr/share/postgresql/9.3/tsearch_data/dutch.affix": "SFX Na N 1"
It got pointed out to me that the first error appears to be a wrongful one as can be found in its man page: http://linux.die.net/man/4/hunspell
COMPOUNDMIN num Minimum length of words used for compounding. Default value is 3 letters.
Update: COMPOUND Hunspell functions can can't work in PostgreSQL see: http://www.postgresql.org/docs/current/static/textsearch-dictionaries.html#TEXTSEARCH-ISPELL-DICTIONARY
The SFX syntax, is beyond me. The invalid byte sequence must be fixable as well I presume if I somehow manage to tell PostgreSQL the file type, yet I have no clue how to do that.
Anyone got any idea how to load these files?
The Dutch dictionaries provided with Debian still produce errors this is part of the Myspell package, and I can't get it to work. Anyone any success with that?
For now I will try and file a bug report to Debian since it is a function that should be working.