Re: Tsearch2 - list of words or phrase with count
От | Oleg Bartunov |
---|---|
Тема | Re: Tsearch2 - list of words or phrase with count |
Дата | |
Msg-id | Pine.GSO.4.58.0407221330430.29036@ra.sai.msu.su обсуждение исходный текст |
Ответ на | Tsearch2 - list of words or phrase with count (Michal Hlavac <hlavki@medium13.sk>) |
Список | pgsql-general |
Michal, check stat() function. http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_Notes apod=# select * from stat('select ti from apod') order by ndoc desc, nentry\ apod=# desc,word limit 10; word | ndoc | nentry --------+------+-------- year | 1283 | 2064 star | 1273 | 3908 imag | 1267 | 1967 light | 1232 | 2206 pictur | 1177 | 1442 earth | 1059 | 1798 visibl | 992 | 1259 bright | 936 | 1335 котор | 903 | 1441 эт | 879 | 1397 Oleg On Thu, 22 Jul 2004, Michal Hlavac wrote: > 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 > > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
В списке pgsql-general по дате отправления: