Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2954CA684DE for ; Mon, 21 May 2012 19:31:39 -0300 (ADT) Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SWb8c-0007XF-14 for pgsql-bugs@postgresql.org; Mon, 21 May 2012 22:31:39 +0000 Received: from andres.at.anarazel.de.authenticated.anarazel.de by mail.anarazel.de (Postfix) with ESMTPA id 8F5BB450005 for ; Tue, 22 May 2012 00:31:23 +0200 (CEST) From: Andres Freund 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 User-Agent: KMail/1.13.7 (Linux/3.4.0-rc6-andres-00076-gd60b9c1; KDE/4.7.4; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201205220031.22557.andres@anarazel.de> X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201205/129 X-Sequence-Number: 33100 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