Search Postgresql Archives

Re: turning a tsvector without position in a weighted tsvector

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

 



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@xxxxxxxxxx, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

--
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