Skip site navigation (1) Skip section navigation (2)

Tsearch2 - list of words or phrase with count

From: Michal Hlavac <hlavki(at)medium13(dot)sk>
To: pgsql-general(at)postgresql(dot)org
Subject: Tsearch2 - list of words or phrase with count
Date: 2004-07-22 08:02:19
Message-ID: 40FF748B.8070800@medium13.sk (view raw or flat)
Thread:
Lists: pgsql-general
hello,

I have table with text attribute and fulltext index...

is it possible to do query with result:

word or phrase, count

for example:
SELECT word, my_count(word) FROM table WHERE expression.

   word    |   my_count
----------|------------
  'hello'  |      3
  'bye'    |      4
  'yellow' |      1
  'blue'   |      5

thanx, hlavki

-- 

[ miso hlavac ][ hlavki(at)medium13(dot)sk ][ http://hlavki.sk ]
[ icq:94900232 ][ callto://hlavki ]

Responses

pgsql-general by date

Next:From: Oleg BartunovDate: 2004-07-22 09:32:10
Subject: Re: Tsearch2 - list of words or phrase with count
Previous:From: Kevin MacdonaldDate: 2004-07-22 04:34:26
Subject: Table access method not behaving like Oracle (index vs sequential scan). Examples and stats provided.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group