pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Artur Zakirov <a.zakirov@postgrespro.ru>
To: aslesha.akella@gmail.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #13766: weird ts_headline/ts_vector/ts_query behaviour
Date: Wed, 18 Nov 2015 11:24:43 +0300
Message-ID: <564C35CB.9020800@postgrespro.ru> (raw)
In-Reply-To: <20151110135342.2567.84095@wrigleys.postgresql.org>
References: <20151110135342.2567.84095@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 10.11.2015 16:53, aslesha.akella@gmail.com wrote:
>
> We are trying to make text search for a word "goede" and "goed". It got the
> following results with different languages.
>

Hi

Do you use predefined text search configurations "english" and "dutch"?

If so and you do not change them, then "english" and "dutch" 
configurations use English and Dutch stemming algorithms 
(https://en.wikipedia.org/wiki/Stemming) and check for stop words. In 
the following examples you can see how words are converted to lexems:

 > select to_tsvector('dutch', 'Goede vrijdag');
      to_tsvector
----------------------
  'goed':1 'vrijdag':2
(1 row)

 > select to_tsvector('dutch', 'Goed vrijdag');
      to_tsvector
----------------------
  'goed':1 'vrijdag':2
(1 row)

 > select to_tsvector('english', 'Goed vrijdag');
     to_tsvector
--------------------
  'go':1 'vrijdag':2
(1 row)

 > select to_tsvector('english', 'Goede vrijdag');
      to_tsvector
----------------------
  'goed':1 'vrijdag':2
(1 row)

The simple configuration do not use stemming algorithms. It only convert 
input words to lower case lexems and exclude stop words.

You also can create ispell dictionary and use it. More information in 
the documentation:
http://www.postgresql.org/docs/devel/static/textsearch-dictionaries.html
and good articles:
http://shisaa.jp/postset/postgresql-full-text-search-part-1.html
http://shisaa.jp/postset/postgresql-full-text-search-part-2.html
http://shisaa.jp/postset/postgresql-full-text-search-part-3.html

But I am not sure that I understood your question correctly.

-- 
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <564C35CB.9020800@postgrespro.ru>
Permalink:  ../564C35CB.9020800@postgrespro.ru/
Also on:    postgresql.org/message-id/564C35CB.9020800@postgrespro.ru

 · 

reply

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: a.zakirov@postgrespro.ru, aslesha.akella@gmail.com
  Subject: Re: BUG #13766: weird ts_headline/ts_vector/ts_query behaviour
  In-Reply-To: <564C35CB.9020800@postgrespro.ru>
  References: <20151110135342.2567.84095@wrigleys.postgresql.org> <564C35CB.9020800@postgrespro.ru>

* 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