Re: tsearch2 punctuation question - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: tsearch2 punctuation question
Date
Msg-id Pine.LNX.4.64.0704261916150.12152@sn.sai.msu.ru
Whole thread Raw
In response to tsearch2 punctuation question  (John DeSoi <desoi@pgedit.com>)
List 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 by date:

Previous
From: "Ed L."
Date:
Subject: Re: HP/Pgsql/DBD::Pg issue
Next
From:
Date:
Subject: Re: a math question