Re: Full text search in PostgreSQL 8.4 - Mailing list pgsql-general

From Andreas Wenk
Subject Re: Full text search in PostgreSQL 8.4
Date
Msg-id 4A645091.8090301@netzmeister-st-pauli.de
Whole thread Raw
In response to Full text search in PostgreSQL 8.4  (Konstantin Pavlov <varicond@yahoo.com>)
Responses Re: Full text search in PostgreSQL 8.4 [SOLVED]
List pgsql-general
> Hello,
>
>
> I recently upgraded to version 8.4 and now full text search with russian
> configuration is not working:
>
>
> template1=# create database test encoding='win1251';
>
> test=# create table test ("test" varchar(255));
>
> test=# insert into test values ('тест');
>
> test=# select * from test where to_tsvector('russian', test) @@
> to_tsquery('russian', 'тест');
>
>
>
> In 8.3 version I have result:
>
>  test
>
> ------
>
> тест
>
> (1 запись)
>
>
>
>
> In 8.4 I have this notice and 0 rows with any table values:
>
>  NOTICE: text-search query contains only stop words or doesn't contain
> lexemes, ignored
>
> test
>
> ------
>
> (0 rows)
>
>
> Why it may not working in 8.4 version?
>
>
>
>
> Thanks
>
>

Hi Konstantin,

I ran your tests with 8.3 and 8.4. I have the expected result:

postgres=# \c test
psql (8.4.0)
You are now connected to database "test".
test=# create table test ("test" varchar(255));
CREATE TABLE
test=# insert into test values ('тест');
INSERT 0 1
test=# select * from test where to_tsvector('russian', test) @@ to_tsquery('russian', 'тест');
  test
------
  тест
(1 row)

I have a clean installation - means the dictionarys are not edited. After insterting тест
into the russian.stop file, I can reproduce your case:

test=# select * from test where to_tsvector('russian', test) @@ to_tsquery('russian', 'тест');
NOTICE:  text-search query contains only stop words or doesn't contain lexemes, ignored
  test
------
(0 rows)

If you would have given the column test the data type tsvector, probably no value would
have been inserted. Just try it with another column and see if you can insert тест into
that column.

This is just an idea ...

Cheers Andy

pgsql-general by date:

Previous
From: Florian Weimer
Date:
Subject: Re: Working around spurious unique constraint errors due to SERIALIZABLE bug
Next
From: Arndt Lehmann
Date:
Subject: Re: PostgreSQL Databse Migration to the Latest Version and Help for Database Replication.