From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tsearch Parser Hacking |
Date: | 2011-02-15 07:56:57 |
Message-ID: | Pine.LNX.4.64.1102151046410.278@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 14 Feb 2011, David E. Wheeler wrote:
> On Feb 14, 2011, at 11:37 PM, Oleg Bartunov wrote:
>
>> it's not easy to hack tsearch parser, sorry. You can preparse your input
>> before to_tsquery,to_tsvector.
>
> Yeah, I was thinking about s{/}{-}g before passing the values in. Might be the only way to do it for now?
actually, it's not so difficult to *hack* parser to treat '/' as '-'.
I thought about overriding some default parser behaviour, but didn't come
to any useful solution.
btw, some users already wrote their own parsers and even I have little
tutorial:
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/HOWTO-parser-tsearch2.html
I wonder if it's worth to add it to
http://www.postgresql.org/docs/8.4/static/test-parser.html
Probably, good paper/presentation along with improving code docs would be
enough for now, until someone got very bright idea about parser and
time to implement it.
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 | Heikki Linnakangas | 2011-02-15 08:19:08 | Re: SSI bug? |
Previous Message | Oleg Bartunov | 2011-02-15 07:44:35 | Re: tsearch Parser Hacking |