Re: Searching the Database

From: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
To: 'simran' <simran(at)cse(dot)unsw(dot)edu(dot)au>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Searching the Database
Date: 2002-08-22 14:04:24
Message-ID: E2870D8CE1CCD311BAF50008C71EDE8E01F74982@MAIL_EXCHANGE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I don't think there is anything inbuilt to do what you want,
but contrib/tsearch may well be worth a look as might:
http://openfts.sourceforge.net
(I think this does relevance sorting).
hth,
- Stuart

> -----Original Message-----
> From: simran [mailto:simran(at)cse(dot)unsw(dot)edu(dot)au]
> Sent: 22 August 2002 03:21
> To: pgsql-novice(at)postgresql(dot)org
> Subject: [NOVICE] Searching the Database
>
>
> 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.
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

Browse pgsql-novice by date

  From Date Subject
Next Message JDK 2002-08-22 14:21:20 Enforcing Case
Previous Message Henshall, Stuart - WCP 2002-08-22 13:59:02 Re: Simple but slow