Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoWIW-0005Fs-10 for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Oct 2015 12:45:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZoWIV-0002NU-9q for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Oct 2015 12:45:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZoUmy-0004yC-RR for pgsql-bugs@postgresql.org; Tue, 20 Oct 2015 11:09:08 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZoUmu-0005vC-QB for pgsql-bugs@postgresql.org; Tue, 20 Oct 2015 11:09:07 +0000 MIME-Version: 1.0 Subject: BUG #13690: Full Text Search with spanish dictionary cannot find some words To: pgsql-bugs@postgresql.org From: vtamara@pasosdeJesus.org Date: Tue, 20 Oct 2015 11:08:57 +0000 Message-ID: <20151020110857.3017.63066@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13690 Logged by: Vladimir Támara Patiño Email address: vtamara@pasosdeJesus.org PostgreSQL version: 9.4.5 Operating system: adJ/OpenBSD Description: Consider the following table with one register: CREATE TABLE cat ( nombre character varying(500) ); INSERT INTO cat (nombre) VALUES ('Politica Social'); The following search in english succeeds (returns 1): SELECT COUNT(*) FROM cat WHERE to_tsvector('english', nombre) @@ to_tsquery('english', 'politi:*' ); But fails using the spanish dictionary (returns 0): SELECT COUNT(*) FROM cat WHERE to_tsvector('spanish', nombre) @@ to_tsquery('spanish', 'politi:*' ); In all the cases I tried, the search with the english dictionary succeeded. However using the spanish dictionary the search will succed for example with 'poli', 'polit', 'politica' but will fail with 'politi' and 'politic' I'm using the dictionary of stop words included with PostgreSQL 9.4.5. I also tested in a PostgreSQL 9.1.12 running on a Linux Ubuntu 15.04, and I observed exactly the same error using spanish dictionary (can find 'polit' and 'politica' but cannot find 'politi' neither 'politic'). Here is the SQL I'm using for testing: CREATE TABLE cat ( nombre character varying(500) ); INSERT INTO cat (nombre) VALUES ('Politica Social'); SELECT COUNT(*) FROM cat WHERE to_tsvector('spanish', nombre) @@ to_tsquery('spanish', 'polit:*'); SELECT COUNT(*) FROM cat WHERE to_tsvector('english', nombre) @@ to_tsquery('english', 'polit:*'); SELECT COUNT(*) FROM cat WHERE to_tsvector('spanish', nombre) @@ to_tsquery('spanish', 'politi:*'); -- Error gives 0 should be 1 SELECT COUNT(*) FROM cat WHERE to_tsvector('english', nombre) @@ to_tsquery('english', 'politi:*'); SELECT COUNT(*) FROM cat WHERE to_tsvector('spanish', nombre) @@ to_tsquery('spanish', 'politic:*'); -- Error gives 0 should be 1 SELECT COUNT(*) FROM cat WHERE to_tsvector('english', nombre) @@ to_tsquery('english', 'politic:*'); SELECT COUNT(*) FROM cat WHERE to_tsvector('spanish', nombre) @@ to_tsquery('spanish', 'politica:*'); SELECT COUNT(*) FROM cat WHERE to_tsvector('english', nombre) @@ to_tsquery('english', 'politica:*'); -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs