How to perform full text search

Поиск
Список
Период
Сортировка
От Andrus
Тема How to perform full text search
Дата
Msg-id 7F1C5A8700D54CEEB1FEAEB4594D14DF@dell2
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Using copy with a file containing blank rows
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: psql latex and newlines