| От | Mike Rylander |
|---|---|
| Тема | Re: tsearch2 and case |
| Дата | |
| Msg-id | b918cf3d0507041355299e22c1@mail.gmail.com обсуждение исходный текст |
| Ответ на | tsearch2 and case ("Uwe C. Schroeder" <uwe@oss4u.com>) |
| Список | pgsql-general |
On 7/4/05, Uwe C. Schroeder <uwe@oss4u.com> wrote:
>
> First of all: Happy Independence Day.
>
> I've got a quick question for those with tsearch2 experience.
> I set tsearch2 up and it works great (although I'd like to search for phrases
> too, but I guess that's not supported at this time).
To do phrase searching just add an additional WHERE clause to your query:
SELECT id FROM tab WHERE ts_idx_col @@ to_tsquery('history&lesson')
AND text_col ~* '.*history\\s+lesson.*';
The full-text index will still be used, and the regex will be used to
prune the results afterwards.
--
Mike Rylander
mrylander@gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера