Searching the Database

From: simran <simran(at)cse(dot)unsw(dot)edu(dot)au>
To: pgsql-novice(at)postgresql(dot)org
Subject: Searching the Database
Date: 2002-08-22 02:20:42
Message-ID: 1029982842.31749.35.camel@pingu.sitesuite.ss
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

Is there a tool/plugin for Postgres that i can use to "search" the
database.

Aka, if i have a database with a lot of content, can i search the
database like a search engine would?

Something like this maybe?:

psql> search mycolumn1, mycolumn2 from mytable
where keywords="clock radio", scheme="simple";

where the database looks up the "scheme" and has a set of rules
associated with say "the 'simple' scheme" which says:

* search the columns - and returns the results in the following
order:
* rows with "all the keywords together" are listed first
* rows with "all the keywords in the columns somewhere"
* rows with as many of the keywords as possible
* rows with any keyword
* ...

What this would provide is almost a "result set in order of relevance" -
much like search engine results.

Is there anything that can do the above? (or similar to it).

I guess i can always take the "keywords" and build about 10 SQL queries
from it, with the first query returning the most relevant reuslt etc...
but if there was something in the database that did that already, it
would be fantastic.

kind regards,

simran.

Browse pgsql-novice by date

  From Date Subject
Next Message Mark Stosberg 2002-08-22 02:20:54 Re: Event recurrence - in database or in application code ????
Previous Message Chad Thompson 2002-08-22 01:11:42 Re: Simple but slow