Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A72B19FB433 for ; Fri, 23 Feb 2007 14:51:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 62593-02 for ; Fri, 23 Feb 2007 14:50:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sn.sai.msu.ru (sn.sai.msu.ru [195.208.220.215]) by postgresql.org (Postfix) with ESMTP id 122069FB41F for ; Fri, 23 Feb 2007 14:50:57 -0400 (AST) Received: from sn.sai.msu.ru (localhost [127.0.0.1]) by sn.sai.msu.ru (8.12.8/8.12.8) with ESMTP id l1NIojqR004026; Fri, 23 Feb 2007 21:50:45 +0300 Received: from localhost (megera@localhost) by sn.sai.msu.ru (8.12.8/8.12.8/Submit) with ESMTP id l1NIojDD004023; Fri, 23 Feb 2007 21:50:45 +0300 X-Authentication-Warning: sn.sai.msu.ru: megera owned process doing -bs Date: Fri, 23 Feb 2007 21:50:45 +0300 (MSK) From: Oleg Bartunov X-X-Sender: megera@sn.sai.msu.ru To: Louis-David Mitterrand cc: pgsql-sql@postgresql.org Subject: Re: simple web search In-Reply-To: <20070223183452.GA23406@apartia.fr> Message-ID: References: <20070223162731.GA25577@apartia.fr> <1172255474.736.1.camel@pampa> <20070223183452.GA23406@apartia.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.165 tagged_above=0 required=5 tests=AWL, BAYES_50, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200702/236 X-Sequence-Number: 27570 On Fri, 23 Feb 2007, Louis-David Mitterrand wrote: > On Fri, Feb 23, 2007 at 01:31:14PM -0500, Joe wrote: >> Hello Louis-David, >> >> On Fri, 2007-02-23 at 17:27 +0100, Louis-David Mitterrand wrote: >>> I'm considering implementing a search box on my review web site >>> http://lesculturelles.net and am looking for a simple way to match >>> entered words against several columns on related tables: show.show_name, >>> story.title, person.firtname, person.lastname, etc. >>> >>> What is the most elegant way to build a single query to match search >>> words with multiple columns? >> >> You may want to take a look at contrib/tsearch2. > > Thanks Joe, I initially wanted to avoid dipping my toe into tsearch2 but > it might be what I need after all :) Don't be afraid, it's not so difficult to start. Regards, Oleg _____________________________________________________________ Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru), Sternberg Astronomical Institute, Moscow University, Russia Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(495)939-16-83, +007(495)939-23-83