pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Oleg Bartunov <oleg@sai.msu.su>
To: jtx <jtx@hatesville.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: relevance
Date: Thu, 17 Jul 2003 06:37:49 +0400 (MSD)
Message-ID: <Pine.GSO.4.56.0307170637000.12656@ra.sai.msu.su> (raw)
In-Reply-To: <001001c34bfd$acad8d50$c733a8c0@slappy>
References: <001001c34bfd$acad8d50$c733a8c0@slappy>
Have you seen contrib/tsearch ?
http://www.sai.msu.su/~megera/postgres/gist/tsearch/
Oleg
On Wed, 16 Jul 2003, jtx wrote:
> I'm trying to build a really basic search engine for a site I'm using -
> say I'm going to simplify this as much as I can.
>
> Say I have a table with 2 columns: id, message
>
> Person wants to search for the term 'sql'. So, I'd do a simple search
> like:
>
> select id from tablename where message like '%sql%';
>
> If there any way to determine exactly how many times 'sql' is matched in
> that search in each particular row, and then sort by the most matches,
> or am I going to have to write a script to do the sorting for me?
>
> Thanks!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
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
view thread (5+ messages) latest in thread
Message-ID: <Pine.GSO.4.56.0307170637000.12656@ra.sai.msu.su> Permalink: ../Pine.GSO.4.56.0307170637000.12656@ra.sai.msu.su/ Also on: postgresql.org/message-id/Pine.GSO.4.56.0307170637000.12656@ra.sai.msu.su ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-sql@postgresql.org Cc: oleg@sai.msu.su, jtx@hatesville.com Subject: Re: relevance In-Reply-To: <Pine.GSO.4.56.0307170637000.12656@ra.sai.msu.su> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox