Re: Writting a "search engine" for a pgsql DB

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Madison Kelly <linux(at)alteeve(dot)com>
Cc: Mark Stosberg <mark(at)summersault(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Writting a "search engine" for a pgsql DB
Date: 2007-02-26 17:55:18
Message-ID: 45E31F06.8080002@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Joshua, I've been digging around the CVS (web) looking for the search
> engine code but so far have only found the reference (www.search) in
> 'general.php' but can't locate the file. You wouldn't happen to have a
> direct link would you?

It's all in module "portal". You will find the indexing stuff in
tools/search, and the search interface in system/page/search.php.

> I think the more direct question I was trying to get at is "How do you
> build a 'relavence' search engine? One where results are returned/sorted
> by relevance of some sort?". At this point, the best I can think of,
> would be to perform multiple queries; first matching the whole search
> term, then the search term starting a row, then ending a row, then
> anywhere in a row and "scoring" the results based on which query they
> came out on. This seems terribly cumbersome (and probably slow, indexes
> be damned) though. I'm hoping there is a better way! :)

The tsearch2 ranking features are pretty good.

//Magnus

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Stosberg 2007-02-26 18:15:07 Re: Writting a "search engine" for a pgsql DB
Previous Message Madison Kelly 2007-02-26 17:47:20 Re: Writting a "search engine" for a pgsql DB