Re: BUG #6654: Full text search doesn't find europe

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6654: Full text search doesn't find europe
Date: 2012-05-21 22:31:21
Message-ID: 201205220031.22557.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Monday, May 21, 2012 07:26:38 PM wbrana(at)gmail(dot)com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 6654
> Logged by: wbrana
> Email address: wbrana(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-05-21 23:01:57 Re: BUG #6654: Full text search doesn't find europe
Previous Message Edmund Horner 2012-05-21 22:28:57 Re: PostgreSQL 9.2 beta1's pg_upgrade fails on Windows XP