Re: tsearch2 punctuation question

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: tsearch2 punctuation question
Дата
Msg-id Pine.LNX.4.64.0704261916150.12152@sn.sai.msu.ru
обсуждение исходный текст
Ответ на tsearch2 punctuation question  (John DeSoi <desoi@pgedit.com>)
Список pgsql-general
On Thu, 26 Apr 2007, John DeSoi wrote:

> For example:
>
>
> select to_tsvector('cat,dog apple/orange');
>
>          to_tsvector
> ----------------------------------
> 'cat':1 'dog':2 'apple/orange':3
> (1 row)
>
>
> Is there a setting that allows me to specify that strings containing the '/'
> should be parsed into separate words? As is, I can't find 'apple' or
> 'orange'.

There is no such settings.
You can write your parser or  dictionary for 'file' token type. We have
howto, see
http://mira.sai.msu.su/~megera/pgsql/ftsdoc/appendixes.html

If you want simple parser, probable better to write one. Probably, the
simple way is to write dictionary, which will return
{apple/orange, apple,orange}.

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

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

Предыдущее
От: "Ed L."
Дата:
Сообщение: Re: HP/Pgsql/DBD::Pg issue
Следующее
От:
Дата:
Сообщение: Re: a math question