Thread: Tsearch2 Spanish Dictionary

Tsearch2 Spanish Dictionary

From
Mario Ignacio Rodríguez Cortés
Date:
Hi All:

I have installed postgresql 8.3.1 on a Gentoo server, but i think that
the spanish dictionary isn't the correct because i have another two
machines with other postgresql versions and tserch2 installed, and a
simple test that i do is make a query with the spanish dictionary, i get
the follow results, the problem that i saw is in the accent, if i put a
word with accent doesn't work:

In postgresql-8.1.8:

SELECT to_tsvector('spanish','estadística');
 to_tsvector
--------------
 'estadist':1
(1 fila)


In postgresql-8.2.4:

SELECT to_tsvector('spanish','estadística');
 to_tsvector
--------------
 'estadist':1
(1 fila)

But in postgresql-8.3.1:

SELECT to_tsvector('spanish','estadística');
 to_tsvector
-------------
 'stic':2
(1 row)

whitout accent:

SELECT to_tsvector('spanish','estadistica');
 to_tsvector
-------------
 'estadist':2
(1 row)



what should i do to make it work well?

Thanks.

Mario Rdz.

Re: Tsearch2 Spanish Dictionary

From
Alvaro Herrera
Date:
Mario Ignacio Rodríguez Cortés wrote:

> But in postgresql-8.3.1:
>
> SELECT to_tsvector('spanish','estadística');
>  to_tsvector
> -------------
>  'stic':2
> (1 row)

It works for me:

alvherre=# SELECT to_tsvector('spanish','estadística');
 to_tsvector
--------------
 'estadist':1
(1 fila)

alvherre=# select version();
                                                           version
      

------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.4devel on x86_64-unknown-linux-gnu, compiled by GCC gcc-4.1 (GCC) 4.1.3 20080114 (prerelease) (Debian
4.1.2-19)
(1 fila)


So I'm thinking you've got encoding problems.  Did you set up
client_encoding appropriately?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support