Re: ts_tovector() to_query()

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: ts_tovector() to_query()
Дата
Msg-id 20130329115831.GB3171@depesz.com
обсуждение исходный текст
Ответ на ts_tovector() to_query()  ("Severn, Chris" <chris_severn@chernay.com>)
Ответы Re: ts_tovector() to_query()
Список pgsql-general
On Thu, Mar 28, 2013 at 08:50:50PM +0000, Severn, Chris wrote:
> What I want to do is return items that have 'Robocop' or 'Robocop and
> DVD' or 'Robocop and Collection' or 'Robocop and DVD and collection'

Based on the criteria above, I would say that:
SELECT m.* FROM movies m WHERE to_tsvector(m.item_title) @@ to_tsquery('Robocop')

will do what you need, since "dvd" and "collection" are irrelevant for
the results.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/


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

Предыдущее
От: aasat
Дата:
Сообщение: Re: UNLOGGED TEMPORARY tables?
Следующее
От: "Severn, Chris"
Дата:
Сообщение: Re: ts_tovector() to_query()