From: | Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Full text search in PostgreSQL 8.4 |
Date: | 2009-07-20 11:10:09 |
Message-ID: | 4A645091.8090301@netzmeister-st-pauli.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert James | 2009-07-20 13:22:19 | Re: Understanding sequential versus index scans. |
Previous Message | Florian Weimer | 2009-07-20 10:42:11 | Re: Working around spurious unique constraint errors due to SERIALIZABLE bug |