How to perform full text search - Mailing list pgsql-general

From Andrus
Subject How to perform full text search
Date
Msg-id 7F1C5A8700D54CEEB1FEAEB4594D14DF@dell2
Whole thread Raw
List pgsql-general
User can enter any number of words as search string.
In shopping cart the following query is used to find products,
eq. if "red cat" is entered:
 
select * from products
where  productname ilike '%'||'red cat'||'%'
  or productdescription ilike '%'||'red cat'||'%'
limit 100
 
This does not find products like "red or black cat".
How to change this query so that it returns 100 best matches for for given search string?
I read documentaton about full text search but havent found step by step solution for this.
 
Using PostgreSQL 8.2.7 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
 
Should I install some contribs to 8.2 or is it better to upgrade server ?
 
Where to find step by step instructions making this work ?
 
Andrus.
 
 
 
 
 

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Using copy with a file containing blank rows
Next
From: Alvaro Herrera
Date:
Subject: Re: psql latex and newlines