BUG #13766: weird ts_headline/ts_vector/ts_query behaviour - Mailing list pgsql-bugs

From aslesha.akella@gmail.com
Subject BUG #13766: weird ts_headline/ts_vector/ts_query behaviour
Date
Msg-id 20151110135342.2567.84095@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13766: weird ts_headline/ts_vector/ts_query behaviour  (Artur Zakirov <a.zakirov@postgrespro.ru>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13766
Logged by:          Calendar 42
Email address:      aslesha.akella@gmail.com
PostgreSQL version: 9.2.4
Operating system:   gentoo
Description:

We are trying to make text search for a word "goede" and "goed". It got the
following results with different languages.

select ts_headline(replace(strip(to_tsvector('dutch', 'Goede
vrijdag'))::text,'''',''), plainto_tsquery('dutch', 'goede'));
 ts_headline
--------------
 goed vrijdag


select ts_headline(replace(strip(to_tsvector('dutch', 'Goede
vrijdag'))::text,'''',''), plainto_tsquery('dutch', 'goed'));
 ts_headline
--------------
 goed vrijdag

(NOTE: this works)
select ts_headline(replace(strip(to_tsvector('english', 'Goede
vrijdag'))::text,'''',''), to_tsquery('english', 'goed'));
      ts_headline
---------------------
 <b>goed</b> vrijdag


select ts_headline(replace(strip(to_tsvector('english', 'Goede
vrijdag'))::text,'''',''), to_tsquery('english', 'goede'));
 ts_headline
--------------
 goed vrijdag


this works too but didnt understand how, because the stem for the word
"Goede" in 'simple' is 'goede'. But 'simple' works for 'goed' and not for
'goede'

select ts_headline(replace(strip(to_tsvector('simple', 'Goede
vrijdag'))::text,'''',''), to_tsquery('simple', 'goed'));
     ts_headline
----------------------
 <b>goede</b> vrijdag

 select ts_headline(replace(strip(to_tsvector('simple', 'Goede
vrijdag'))::text,'''',''), to_tsquery('simple', 'goede'));
  ts_headline
---------------
 goede vrijdag

pgsql-bugs by date:

Previous
From: d.yordanov@nsys-bg.com
Date:
Subject: BUG #13765: Bug in openning a new window for query script
Next
From: Tom Lane
Date:
Subject: Re: BUG #13764: function ghstore_consistent() returns a wrong value if var "strategy" contains an unsupported number