From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | John DeSoi <desoi(at)pgedit(dot)com> |
Cc: | "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: tsearch2 punctuation question |
Date: | 2007-04-26 15:20:27 |
Message-ID: | Pine.LNX.4.64.0704261916150.12152@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | tom | 2007-04-26 15:39:30 | Re: a math question |
Previous Message | Joshua D. Drake | 2007-04-26 15:10:32 | Re: Feature request - have postgresql log warning when new sub-release comes out. |