relevance - Mailing list pgsql-sql

From jtx
Subject relevance
Date
Msg-id 001001c34bfd$acad8d50$c733a8c0@slappy
Whole thread Raw
Responses Re: relevance  (Oleg Bartunov <oleg@sai.msu.su>)
List 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!



pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: numerical sort on mixed alpha/numeric data
Next
From: Oleg Bartunov
Date:
Subject: Re: relevance