From: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: exposing more parse was: Re: tsearch2: setting weights on tsquery |
Date: | 2008-10-21 14:03:05 |
Message-ID: | 20081021160305.6e9679ba@dawn.webthatworks.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 21 Oct 2008 13:20:12 +0200
Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> wrote:
> On Tue, 21 Oct 2008 10:29:52 +0200
> Ivan Sergio Borgonovo <mail(at)webthatworks(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Konoplev | 2008-10-21 14:06:13 | Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4 |
Previous Message | Brandon Metcalf | 2008-10-21 14:00:25 | Re: syncing with a MySQL DB |