BUG #13766: weird ts_headline/ts_vector/ts_query behaviour

From: aslesha(dot)akella(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13766: weird ts_headline/ts_vector/ts_query behaviour
Date: 2015-11-10 13:53:42
Message-ID: 20151110135342.2567.84095@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13766
Logged by: Calendar 42
Email address: aslesha(dot)akella(at)gmail(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-11-10 15:13:11 Re: BUG #13764: function ghstore_consistent() returns a wrong value if var "strategy" contains an unsupported number
Previous Message d.yordanov 2015-11-10 08:08:52 BUG #13765: Bug in openning a new window for query script