From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
Cc: | postgresql Forums <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: turning a tsvector without position in a weighted tsvector |
Date: | 2010-02-08 20:01:45 |
Message-ID: | Pine.LNX.4.64.1002082300490.16860@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 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 tsvectors without
> positions?
> Is there any use-case?
>
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Keaton Adams | 2010-02-08 21:10:13 | Cache lookup failed for relation message in PG 8.3.7 |
Previous Message | Vincenzo Romano | 2010-02-08 19:33:35 | R: One column to multiple columns based on constraints? |