From: Andres Freund <andres@anarazel.de>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #6654: Full text search doesn't find europe
Date: Tue, 22 May 2012 00:31:21 +0200
Message-ID: <201205220031.22557.andres@anarazel.de> (raw)
In-Reply-To: <E1SWWNS-0007oz-0L@wrigleys.postgresql.org>
References: <E1SWWNS-0007oz-0L@wrigleys.postgresql.org>
On Monday, May 21, 2012 07:26:38 PM wbrana@gmail.com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 6654
> Logged by: wbrana
> Email address: wbrana@gmail.com
> PostgreSQL version: 9.1.3
> Operating system: Linux
> Description:
>
> CREATE INDEX idx_post_text ON posts USING gin
> (to_tsvector('english'::regconfig, post_text::text))
> select * from v_search WHERE to_tsvector('english', post_text) @@ 'europe'
> returns no rows, but
> select * from v_search WHERE to_tsvector('english', post_text) @@ 'japan'
> returns row with "Japan and Europe"
The problem is that youre using to_tsvector('english' for parsing the text but
don't specify the text yearch configuration for the query. The default english
configuration does stemming, the default_text_search_configuration obviously
not.
Try ... to_tsvector('english', post_text) @@ to_tsquery('english', 'europe')
Andres
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: andres@anarazel.de
Subject: Re: BUG #6654: Full text search doesn't find europe
In-Reply-To: <201205220031.22557.andres@anarazel.de>
References: <E1SWWNS-0007oz-0L@wrigleys.postgresql.org> <201205220031.22557.andres@anarazel.de>
* 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