Re: Tsvector editing functions - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Tsvector editing functions
Date
Msg-id 565848F8.9050905@sigaev.ru
Whole thread Raw
In response to Tsvector editing functions  (Stas Kelvich <s.kelvich@postgrespro.ru>)
Responses Re: Tsvector editing functions  (Stas Kelvich <s.kelvich@postgrespro.ru>)
List pgsql-hackers
Hmm, seems, it will be useful to add two fuctions:

tsvector filter(tsvector, array_of_weigths) - returns tsvector contains lexemes 
with given weights

tsvector setweight(tsvector, weigth, array_of_lexemes) - sets given weight for 
given lexemes

Stas Kelvich wrote:
> Hello.
>
> There is patch that adds some editing routines for tsvector type.
>
> tsvector delete(tsvector, text)
>     removes entry from tsvector by lexeme name
> set unnest(tsvector)
>     expands a tsvector to a set of rows. Each row has following columns: lexeme, postings, weights.
> text[] to_array(tsvector)
>     converts tsvector to array of lexemes
> tsvector to_tsvector(text[])
>     converts array of lexemes to tsvector
>
>
>
>
>
>
> Stas Kelvich
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
>
>
>
>

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: Tsvector editing functions
Next
From: Teodor Sigaev
Date:
Subject: Re: silent data loss with ext4 / all current versions