X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id B3930D1B8AD for ; Fri, 29 Aug 2003 12:30:13 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 18171-05 for ; Fri, 29 Aug 2003 09:30:06 -0300 (ADT) Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by svr1.postgresql.org (Postfix) with ESMTP id CA042D1B8EE for ; Fri, 29 Aug 2003 09:29:55 -0300 (ADT) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.9.3/8.9.3) with ESMTP id QAA16464; Fri, 29 Aug 2003 16:29:38 +0400 (MSD) Date: Fri, 29 Aug 2003 16:29:38 +0400 (MSD) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: Laurent Patureau Cc: pgsql-sql@postgresql.org Subject: Re: Select Match on PostgreSQL. In-Reply-To: <5.0.0.25.0.20030829123618.02819278@pop.noos.fr> Message-ID: References: <5.0.0.25.0.20030829123618.02819278@pop.noos.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=koi8-r Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/356 X-Sequence-Number: 14972 Laurent, take a look at contrib/tsearch2 http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ It does exactly what you want and more. Oleg On Fri, 29 Aug 2003, Laurent Patureau wrote: > > Hi, > > I'm looking for a SELECT request on PostgreSQL for a search engine. > I'd like the request return me the pertinence (relevance) of each result. > > I've found the MySQL syntax on the web : > mysql> SELECT id, body, MATCH (title,body) AGAINST > -> ('Security implications of running MySQL as root') AS score > -> FROM articles WHERE MATCH (title,body) AGAINST > -> ('Security implications of running MySQL as root'); > > But how can I do it on PostgreSQL where Match syntax is not accepted ? > > Thanks to help me. > > Regards. > > Laurent Patureau. > Co-gérant / Ingénieur d'Affaire. > ____________________________________ > Laurent Patureau > S.A.R.L. ID.fr > > mailto:lpatureau@idfr.net > > http://www.idfr.net > > Porter un nouveau regard à votre audience : > http://www.wysistat.com > > Tel : 03 81 48 03 13 > Fax : 03 81 48 04 83 > > 16, Boulevard Winston Churchill > 25 000 Besançon > ___________________________________ > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83