relevance

From: "jtx" <jtx(at)hatesville(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: relevance
Date: 2003-07-17 00:52:17
Message-ID: 001001c34bfd$acad8d50$c733a8c0@slappy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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!

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Benjamin Smith 2003-07-17 01:34:08 Join table with itself for heirarchial system?
Previous Message Warren Little 2003-07-16 20:52:53 Why do the two queries below return different results?