Thread: PG 8.2.0 - TSearch2 "Wrong affix file format"

PG 8.2.0 - TSearch2 "Wrong affix file format"

From
"Tarabas (Manuel Rorarius)"
Date:
Hi!

  I have a problem migrating my Database using TSearch2 with the UTF-8
  Backport from 8.1.3 to a new database with 8.2.0.

  I successfully installed postgres and the TSearch2 distributed with
  it and copied the german.aff/german.med/german.stop and
  german.stop.ispell from my old postgres 8.1.3 installation to the
  same location in the 8.2.0 install.

  Then I dumped the old database with

  "./pg_dump <database> -f backup-file" and restored it on the
  8.2.0 database successfully without errors.

  I am using UTF-8 database and files for .aff/.med/.stop/.stop.ispell

  When I now try a TSearch2 Command like

  "SELECT set_curdict('de_ispell');"

  I get the error

  "ERROR:  Wrong affix file format" although the file was not changed
  and worked fine on the 8.1.3 Databse with the UTF-8 backport Patch
  from 8.2.0.

  Anyone have any idea how to fix the files so they will work with
  8.2.0 also? The files seem to be ok and are UTF-8 encoded.

Best regards
Manuel


Re: PG 8.2.0 - TSearch2 "Wrong affix file format"

From
Teodor Sigaev
Date:
Send to me dict and aff file, pls

By the way, tsearch2 is changed significantly, so, the better way to update is a
restoring only your data&schema. Tsearch2 should be installed from contrib.

Tarabas (Manuel Rorarius) wrote:
> Hi!
>
>   I have a problem migrating my Database using TSearch2 with the UTF-8
>   Backport from 8.1.3 to a new database with 8.2.0.
>
>   I successfully installed postgres and the TSearch2 distributed with
>   it and copied the german.aff/german.med/german.stop and
>   german.stop.ispell from my old postgres 8.1.3 installation to the
>   same location in the 8.2.0 install.
>
>   Then I dumped the old database with
>
>   "./pg_dump <database> -f backup-file" and restored it on the
>   8.2.0 database successfully without errors.
>
>   I am using UTF-8 database and files for .aff/.med/.stop/.stop.ispell
>
>   When I now try a TSearch2 Command like
>
>   "SELECT set_curdict('de_ispell');"
>
>   I get the error
>
>   "ERROR:  Wrong affix file format" although the file was not changed
>   and worked fine on the 8.1.3 Databse with the UTF-8 backport Patch
>   from 8.2.0.
>
>   Anyone have any idea how to fix the files so they will work with
>   8.2.0 also? The files seem to be ok and are UTF-8 encoded.
>
> Best regards
> Manuel
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org/

--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Re: PG 8.2.0 - TSearch2 "Wrong affix file format"

From
"Tarabas (Manuel Rorarius)"
Date:
Hi,

TS> Send to me dict and aff file, pls

see attached .aff file, I have not created the file from a dict
myself but taken the .aff/.med/.stop/.stop.ispell from this blog:

http://www.tauceti.net/roller/cetixx/category/Tipps ...

TS> By the way, tsearch2 is changed significantly, so, the better way to update is a
TS> restoring only your data&schema. Tsearch2 should be installed from contrib.

That's what I did ... I used the tsearch delivered with 8.2.0 contrib
for the install. Only the Schema and Data for my database was imported with the
restore from the old system, so that should all be setup correctly :-)

I also tested the correct tsearch2 install by removing all lines from the .aff
file and the error then vanishes and the search works, but without the
.aff I guess a key feature is missing :-)

Best regards
Manuel


Attachment

Re: PG 8.2.0 - TSearch2 "Wrong affix file format"

From
Teodor Sigaev
Date:
Affix file has artifact:
PFX G N 1
    .    > GE

which is strange mix of openoffice format and ispell format. Just remove they.

8.2 Ispell code checks format strongly that in previous versions, even backported :)

Tarabas (Manuel Rorarius) wrote:
> Hi,
>
> TS> Send to me dict and aff file, pls
>
> see attached .aff file, I have not created the file from a dict
> myself but taken the .aff/.med/.stop/.stop.ispell from this blog:
>
> http://www.tauceti.net/roller/cetixx/category/Tipps ...
>
> TS> By the way, tsearch2 is changed significantly, so, the better way to update is a
> TS> restoring only your data&schema. Tsearch2 should be installed from contrib.
>
> That's what I did ... I used the tsearch delivered with 8.2.0 contrib
> for the install. Only the Schema and Data for my database was imported with the
> restore from the old system, so that should all be setup correctly :-)
>
> I also tested the correct tsearch2 install by removing all lines from the .aff
> file and the error then vanishes and the search works, but without the
> .aff I guess a key feature is missing :-)
>
> Best regards
> Manuel
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Re: [bulk] Re: PG 8.2.0 - TSearch2 "Wrong affix file format"

From
"Tarabas (Manuel Rorarius)"
Date:
thanks, that fixed it :-)

Best regards
Manuel

TS> Affix file has artifact:
TS> PFX G N 1
TS>     .    > GE

TS> which is strange mix of openoffice format and ispell format. Just remove they.

TS> 8.2 Ispell code checks format strongly that in previous versions, even backported :)