Re: How to perform full text search

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: How to perform full text search
Дата
Msg-id 4F662E00.80900@hogranch.com
обсуждение исходный текст
Ответ на Re: How to perform full text search  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
On 03/18/12 11:45 AM, Andrus wrote:
> select
> +case when productname ilike '%red%'  then 2 else 0 end
> +case when productdescription ilike '%red%'  then 1 else 0 end
> +case when productname ilike '%cat%'  then 1.7 else 0 end
> +case when productdescription ilike '%cat%'  then 0.7 else 0 end
> from products
> order by 1 desc
> limit 100
>
> This allows to define relevance.
> Is my solution reasonable ?

if you don't mind a full table sequential scan each time you execute
that, I suppose.

--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


В списке pgsql-general по дате отправления:

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: How to perform full text search
Следующее
От: jgenoese
Дата:
Сообщение: Re: Ubuntu 11.10 Postgres 9.1.3 is missing pg_resetxlog; where can I get it?