[GENERAL] turning a tsvector without position in a weighted tsvector

2010-02-08 Thread Ivan Sergio Borgonovo
If I convert a string to a tsvector just casting (::tsvector) I obtain a vector without positions. tsvectors without positions don't have weights too. I haven't found a way to turn a vector without weight/pos, into a vector with weight/pos. Is there a way to apply weight/add positions to

Re: [GENERAL] turning a tsvector without position in a weighted tsvector

2010-02-08 Thread Oleg Bartunov
Ivan, what's wrong with: postgres=# select 'abc:1'::tsvector; tsvector -- 'abc':1 postgres=# select setweight('abc:1'::tsvector,'a'); setweight --- 'abc':1A or just use to_tsvector() instead of casting? Oleg On Mon, 8 Feb 2010, Ivan Sergio Borgonovo wrote: If I convert

Re: [GENERAL] turning a tsvector without position in a weighted tsvector

2010-02-08 Thread Ivan Sergio Borgonovo
On Mon, 8 Feb 2010 23:01:45 +0300 (MSK) Oleg Bartunov o...@sai.msu.su wrote: Ivan, what's wrong with: postgres=# select 'abc:1'::tsvector; tsvector -- 'abc':1 Yes you're right. I think I misplaced some quotes. But still, once a vector has no position, I can't add the