Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 101B0650010 for ; Thu, 4 Dec 2008 13:29:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 79009-03 for ; Thu, 4 Dec 2008 13:29:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zimbra.linuxsilo.net (zimbra.linuxsilo.net [92.48.122.79]) by mail.postgresql.org (Postfix) with ESMTP id 64C7E64FCD7 for ; Thu, 4 Dec 2008 13:29:13 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.linuxsilo.net (Postfix) with ESMTP id 9E74C28536 for ; Thu, 4 Dec 2008 17:29:11 +0000 (GMT) X-Virus-Scanned: amavisd-new at Received: from zimbra.linuxsilo.net ([127.0.0.1]) by localhost (zimbra.linuxsilo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rcbqGXmkCNVV for ; Thu, 4 Dec 2008 17:29:11 +0000 (GMT) Received: from zimbra.linuxsilo.net (zimbra.linuxsilo.net [92.48.122.79]) by zimbra.linuxsilo.net (Postfix) with ESMTP id 53DFC28531 for ; Thu, 4 Dec 2008 17:29:11 +0000 (GMT) Date: Thu, 4 Dec 2008 17:29:11 +0000 (GMT) From: Jaume Sabater To: pgsql-admin@postgresql.org Message-ID: <26819476.7901228411751220.JavaMail.root@zimbra.linuxsilo.net> In-Reply-To: <4119648.7881228411625043.JavaMail.root@zimbra.linuxsilo.net> Subject: Re: Using text search for locations, or a computed btree index MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [212.170.239.110] X-Mailer: Zimbra 5.0.10_GA_2609.DEBIAN4.0 (ZimbraWebClient - FF3.0 (Win)/5.0.10_GA_2609.DEBIAN4.0) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/27 X-Sequence-Number: 30860 ----- "Jaume Sabater" wrote: > The guys creating the web site at the company I work for want an > incremental search for locations. So, I need to find all locations > that start with Uni, then Unit, then Unite, and so on. Problem is that Correct: start or contain. > What I don't know how to do is to just tell tsvector (and tsquery when > searching) to do what I need and not what I don't need. I can't find a > way in the online documentation to tell the engine which pieces I want > from the whole puzzle. Rereading the configuration example section of the documentation, just thought that most probably PostgreSQL won't be applying the "phases" of normalization that I don't need if I create a new configuration and don't add any dictionary but the synonyms one (that would be used for the alternate names of locations). Still, not sure how to control the way accented characters are converted. Will tsvector still convert accented characters to their non-accented equivalents if I don't specify any dictionary or thesaurus? -- Jaume Sabater http://linuxsilo.net/ "Ubi sapientas ibi libertas"