Fulltext: problem with english words in german text

Поиск
Список
Период
Сортировка
Искать

Fulltext: problem with english words in german text

От:
Torsten Zühlsdorff <foo@meisterderspiele.de>
Дата:
Hello,

i have a problem with understanding fulltext search in PG 8.3.

Example:

CREATE TABLE tfulltext (body text, fulltext tsvector);

INSERT INTO tfulltext VALUES ('title und description sind wichtige 
grundlagen', to_tsvector('pg_catalog.german', 'title und description 
sind wichtige grundlagen'));

SELECT * from tfulltext;
                       body                      | 
fulltext
------------------------------------------------+---------------------------------------------------
  title und description sind wichtige grundlagen | 'titl':1 'wichtig':5 
'grundlag':6 'description':3

I expect, that the query:
SELECT * FROM tfulltext WHERE fulltext @@ to_tsquery('title');

Will return the entry. But the result-set is empty. If i use 'titl' 
(without 'e') as parameter of to_tsquery it returns the entry.

I try to cast the search-parameter to ts_vector, but it didn't work. How 
can i solve the problem?

Thanks for every hint and greetings from Germany,
Torsten
-- 
http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8 
verschiedenen Datenbanksystemen abstrahiert,
Queries von Applikationen trennt und automatisch die Query-Ergebnisse 
auswerten kann.
FAQ