From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
---|---|
To: | Mike Field <mike(at)fieldco(dot)com>, pgsql-sql(at)postgreSQL(dot)org |
Subject: | RE: [SQL] Search Engine with PHP |
Date: | 1999-09-21 16:59:35 |
Message-ID: | D05EF808F2DFD211AE4A00105AA1B5D25982D2@cpsmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)fieldco(dot)com <mailto:mike(at)fieldco(dot)com>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-09-21 19:18:24 | Re: [SQL] Subselect performance |
Previous Message | Jackson, DeJuan | 1999-09-21 16:06:17 | RE: [SQL] Large char field(s) |