On Tue, 21 Oct 2008 13:20:12 +0200
Ivan Sergio Borgonovo <mail@webthatworks.it> wrote:
> On Tue, 21 Oct 2008 10:29:52 +0200
> Ivan Sergio Borgonovo <mail@webthatworks.it> wrote:
>
> I came across this:
> http://grokbase.com/topic/2007/08/07/general-tsearch2-plainto-tsquery-with-or/r92nI5l_k9S4iKcWdCxKs05yFQk
that's the best thing I came up with:
select * from regexp_replace(
strip(
to_tsvector(
'<a:A href="http://www.google.com">pippo</a> pluto gigio'
))::text,
'\'([^\']*)\'','\\1:A','g');
This actually exploit the parser and you can specify the
configuration.
It would still be nice to be able to directly work with tsvector
and tsquery so people could exploit the parser, lexer etc... and
recycle the config.
I'd thinking something in the line of
for lex in select * from to_tsvector('jsjdjd fdsds')
would be nice.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it