Re: BUG #6654: Full text search doesn't find europe - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #6654: Full text search doesn't find europe
Date
Msg-id 201205220031.22557.andres@anarazel.de
Whole thread Raw
In response to BUG #6654: Full text search doesn't find europe  (wbrana@gmail.com)
Responses Re: BUG #6654: Full text search doesn't find europe
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Edmund Horner
Date:
Subject: Re: PostgreSQL 9.2 beta1's pg_upgrade fails on Windows XP
Next
From: Tom Lane
Date:
Subject: Re: BUG #6654: Full text search doesn't find europe