tokenize string for tsearch?

Поиск
Список
Период
Сортировка
От Ottavio Campana
Тема tokenize string for tsearch?
Дата
Msg-id 463FC4C6.10608@campana.vi.it
обсуждение исходный текст
Ответы Re: tokenize string for tsearch?  (Oleg Bartunov <oleg@sai.msu.su>)
Re: tokenize string for tsearch?  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-general
Hi, I'm trying to use tsearch2 for the first time and I'm having a
problem setting up a query

If I execute

SELECT * from test_table where ts_desc @@ to_tsquery ('hello&world');

it works, but I'm having the problem that the string used for the query
is not 'hello&world' but 'hello world', Moreover, it can have an
arbitrary number of spaces between the words, so I cannot just
substitute the spaces with &, because 'hello&&world' gives error.

What is the safest way transform a string into a list of works "anded"
together?

Thank you

--
Non c'e' piu' forza nella normalita', c'e' solo monotonia.


Вложения

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

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Date Math
Следующее
От: Ottavio Campana
Дата:
Сообщение: change the stop words file for tsearch2