Search Postgresql Archives

Re: exposing more parse was: Re: tsearch2: setting weights on tsquery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 21 Oct 2008 13:20:12 +0200
Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx> wrote:

> On Tue, 21 Oct 2008 10:29:52 +0200
> Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux