From: aslesha.akella@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13766: weird ts_headline/ts_vector/ts_query behaviour
Date: Tue, 10 Nov 2015 13:53:42 +0000
Message-ID: <20151110135342.2567.84095@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: aslesha.akella@gmail.com
Subject: Re: BUG #13766: weird ts_headline/ts_vector/ts_query behaviour
In-Reply-To: <20151110135342.2567.84095@wrigleys.postgresql.org>
References: <20151110135342.2567.84095@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox