Re: Full text search in PostgreSQL 8.4

Поиск
Список
Период
Сортировка
От Andreas Wenk
Тема Re: Full text search in PostgreSQL 8.4
Дата
Msg-id 4A645091.8090301@netzmeister-st-pauli.de
обсуждение исходный текст
Ответ на Full text search in PostgreSQL 8.4  (Konstantin Pavlov <varicond@yahoo.com>)
Ответы Re: Full text search in PostgreSQL 8.4 [SOLVED]
Список 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 по дате отправления:

Предыдущее
От: Florian Weimer
Дата:
Сообщение: Re: Working around spurious unique constraint errors due to SERIALIZABLE bug
Следующее
От: Arndt Lehmann
Дата:
Сообщение: Re: PostgreSQL Databse Migration to the Latest Version and Help for Database Replication.