Re: tsearch Parser Hacking
От | Oleg Bartunov |
---|---|
Тема | Re: tsearch Parser Hacking |
Дата | |
Msg-id | Pine.LNX.4.64.1102151046410.278@sn.sai.msu.ru обсуждение исходный текст |
Ответ на | Re: tsearch Parser Hacking ("David E. Wheeler" <david@kineticode.com>) |
Список | 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@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(495)939-16-83, +007(495)939-23-83
В списке pgsql-hackers по дате отправления: