From: jtx <jtx@hatesville.com>
To: pgsql-sql@postgresql.org
Subject: relevance
Date: Wed, 16 Jul 2003 17:52:17 -0700
Message-ID: <001001c34bfd$acad8d50$c733a8c0@slappy> (raw)
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!
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: jtx@hatesville.com
Subject: Re: relevance
In-Reply-To: <001001c34bfd$acad8d50$c733a8c0@slappy>
* 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