On Mon, 25 Jan 2010 23:35:12 +0300 (MSK)
Oleg Bartunov <
oleg@xxxxxxxxxx> wrote:
> Do you guys wanted something like:
>
> arxiv=# select and2or(to_tsquery('1 & 2 & 3'));
> and2or
> ---------------------
> ( '1' | '2' ) | '3'
> (1 row)
Nearly. I'm starting from a weighted tsvector not from text/tsquery..
I would like to:
- keep the weights in the query
- avoid parsing the text to extract lexemes twice (I already have a
tsvector)
For me extending pg in C is a new science, but I'm actually trying
to write at least a couple of functions that:
- will return a tsvector as a weight int, pos int[], lexeme text
record
- will turn a tsvector + operator into a tsquery
'orange':A1,2,3 'banana':B4,5 'tomato':C6,7 ->
'orange':A | 'banana':B | 'tomato':C
or eventually
'orange':A & 'banana':B & 'tomato':C
thanks
--
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