tsvector extraction patch

Started by Hans-Jürgen Schönigalmost 17 years ago3 messageshackers
Jump to latest
#1Hans-Jürgen Schönig
postgres@cybertec.at

hello,

i made a small patch which i found useful for my personal tasks.
it would be nice to see this in 8.5. if not core then maybe contrib.
it transforms a tsvector to table format which is really nice for text
processing and comparison.

test=# SELECT * FROM tsvcontent(to_tsvector('english', 'i am pretty sure
this is a good patch'));
lex | rank
--------+------
good | 8
patch | 9
pretti | 3
sure | 4
(4 rows)

many thanks,

hans

--
Cybertec Schoenig & Schoenig GmbH
Reyergasse 9 / 2
A-2700 Wiener Neustadt
Web: www.postgresql-support.de

Attachments:

tsvcontent-0.1-ctxdiff.difftext/x-patch; name=tsvcontent-0.1-ctxdiff.diffDownload+208-0
#2Robert Haas
robertmhaas@gmail.com
In reply to: Hans-Jürgen Schönig (#1)
Re: tsvector extraction patch

On Thu, Jul 2, 2009 at 10:13 AM, Hans-Juergen Schoenig --
PostgreSQL<postgres@cybertec.at> wrote:

hello,

i made a small patch which i found useful for my personal tasks.
it would be nice to see this in 8.5. if not core then maybe contrib.
it transforms a tsvector to table format which is really nice for text
processing and comparison.

test=# SELECT * FROM tsvcontent(to_tsvector('english', 'i am pretty sure
this is a good patch'));
 lex   | rank
--------+------
good   |    8
patch  |    9
pretti |    3
sure   |    4
(4 rows)

  many thanks,

     hans

If you'd like this reviewed for the next CommitFest, please add it to
the wiki here:

http://wiki.postgresql.org/wiki/CommitFestOpen

...Robert

#3Oleg Bartunov
oleg@sai.msu.su
In reply to: Hans-Jürgen Schönig (#1)
Re: tsvector extraction patch

I have simple solution
http://www.sai.msu.su/~megera/wiki/2008-12-17

On Thu, 2 Jul 2009, Hans-Juergen Schoenig -- PostgreSQL wrote:

hello,

i made a small patch which i found useful for my personal tasks.
it would be nice to see this in 8.5. if not core then maybe contrib.
it transforms a tsvector to table format which is really nice for text
processing and comparison.

test=# SELECT * FROM tsvcontent(to_tsvector('english', 'i am pretty sure this
is a good patch'));
lex | rank
--------+------
good | 8
patch | 9
pretti | 3
sure | 4
(4 rows)

many thanks,

hans

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