pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Mike Field <mike@fieldco.com>
To: pgsql-sql@postgreSQL.org
Subject: RE: [SQL] Search Engine with PHP
Date: Tue, 21 Sep 1999 11:59:35 -0500
Message-ID: <D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail> (raw)

The best approach that I could think of to solve your problem, would be to
use full-text index (look in the contrib directory of the distribution).
Should be fairly easy to devise a query that would give you match counts
using full-text indexing.

Hope this helps,
	DEJ

> -----Original Message-----
>     Hi all-
>  
> I'm making an internal search engine with PHP.
> So far, the user enters keywords and the database is searched with:
>  
> SELECT ... WHERE lower(fieldname) LIKE lower(keyword1) AND
> lower(fieldname) LIKE lower(keyword2)...
>  
> and this works great.  Although, now I want the answers diplayed in order
> of best match (not sorted just by a fieldname).  How do I do this?  Do I
> need to totally restructure the search engine?  Can I do it with a count(
> ) function?  If so, how?  
>  
> Any help would be great.
> Thanks,
> Mike
>  
> mike@fieldco.com <mailto:mike@fieldco.com>
>  



view thread (2+ messages)

Message-ID: <D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail>
Permalink:  ../D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail/
Also on:    postgresql.org/message-id/D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: djackson@cpsgroup.com, mike@fieldco.com
  Subject: Re: [SQL] Search Engine with PHP
  In-Reply-To: <D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail>
  References: <D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail>

* 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