pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: Madison Kelly <linux@alteeve.com>
Cc: Mark Stosberg <mark@summersault.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Writting a "search engine" for a pgsql DB
Date: Mon, 26 Feb 2007 18:55:18 +0100
Message-ID: <45E31F06.8080002@hagander.net> (raw)
In-Reply-To: <45E31D28.2020402@alteeve.com>
References: <45E30ADA.2050700@alteeve.com>
	<45E31300.4070701@commandprompt.com>
	<erv5jn$2l1b$1@news.hub.org>
	<45E31D28.2020402@alteeve.com>

>   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




view thread (21+ messages)  latest in thread

Message-ID: <45E31F06.8080002@hagander.net>
Permalink:  ../45E31F06.8080002@hagander.net/
Also on:    postgresql.org/message-id/45E31F06.8080002@hagander.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: magnus@hagander.net, linux@alteeve.com, mark@summersault.com
  Subject: Re: Writting a "search engine" for a pgsql DB
  In-Reply-To: <45E31F06.8080002@hagander.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox