Re: Tsearch2 - spanish - Mailing list pgsql-general

From Felipe de Jesús Molina Bravo
Subject Re: Tsearch2 - spanish
Date
Msg-id 1190144835.6821.55.camel@fjmb
Whole thread Raw
In response to Tsearch2 - spanish  (Felipe de Jesús Molina Bravo<felipe.molina@inegi.gob.mx>)
Responses Re: Tsearch2 - spanish
Re: Tsearch2 - spanish
List pgsql-general
Hi

You are rigth, the output of "show lc_ctype;" is C.

Then I did is:

prueba1=# show lc_ctype;
    lc_ctype
-----------------
 es_MX.ISO8859-1
(1 row)

and do it

 % initdb -D /YOUR/PATH -E LATIN1 --locale es_ES.ISO8859-1

(how you do say)

and "createdb -E iso8859-1 prueba1" and finally tsearch2

the original problem is resolved

prueba1=# select to_tsvector('espanol','melón');
 to_tsvector
-------------
 'melón':1
(1 row)


but if I change the sentece for it:

prueba1=# select to_tsvector('espanol','melón  perro mordelón');
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>


??? lost the connection ... the server is up .... any idea?

The synonym is intentional


thanks in advanced


El mar, 18-09-2007 a las 21:40 +0400, Teodor Sigaev escribió:
> >         LC_CTYPE="POSIX"
>
>
> pls, output of "show lc_ctype;" command. If it's C locale then I can identify
> problem - characters diacritical mark (as ó) is not an alpha character, and
> ispell dictionary will fail. To fix that you should run initdb with options:
> % initdb -D /YOUR/PATH -E LATIN1 --locale es_ES.ISO8859-1
> or
> % initdb -D /YOUR/PATH -E UTF8 --locale es_ES.UTF8
>
> In last case you should also recode all dictionary's datafile in utf8 encoding.
>
> >>>         prueba=# select to_tsvector('espanol','melón');
> >>>         ERROR:  Affix parse error at 506 line
> >> and
> >>>         prueba=# select lexize('sp','melón');
> >>>          lexize
> >>>         ---------
> >>>          {melon}
> >>>         (1 row)
> sp is a Snowball stemmer, it doesn't require affix file, so it works.
>
> By the way, why is synonym dictionary paced after ispell? is it intentional?
> Usually, synonym dictionary goes first, then ispell and after all of them snowball.
>

pgsql-general by date:

Previous
From: Ken Logan
Date:
Subject: Re: Problem dropping table
Next
From: "Walter Roeland"
Date:
Subject: Version 8.2.5 for Windows doesn't startup normally after upgrading from 8.2.4