Re: turning a tsvector without position in a weighted tsvector

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: turning a tsvector without position in a weighted tsvector
Дата
Msg-id Pine.LNX.4.64.1002082300490.16860@sn.sai.msu.ru
обсуждение исходный текст
Ответ на turning a tsvector without position in a weighted tsvector  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: turning a tsvector without position in a weighted tsvector  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список 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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

В списке pgsql-general по дате отправления:

Предыдущее
От: Vincenzo Romano
Дата:
Сообщение: R: One column to multiple columns based on constraints?
Следующее
От: Michael van der Kolff
Дата:
Сообщение: WINDOW functions - proposed addition weight (dp) for percent_rank, cume_dist