Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/oscon_tsearch2/stat.html
Дата изменения: Unknown
Дата индексирования: Sat Dec 22 10:27:28 2007
Кодировка:

Поисковые слова: arp 220
Open Source Convention
 Previous   Next 

Function stat

For a tsvector column in a table, returns the distinct words along with their frequency. This includes the number of documents (table rows) containing a word and the number of entries for a word which includes multiple occurrences within a row.

stat(txt TEXT) RETURNS SETOF STATINFO

  • 'txt' is a select statement that selects a tsvector column from a table.
SELECT * 
FROM stat('SELECT ts_vec FROM ts_readme') 
ORDER BY ndoc desc, word 
LIMIT 5;
   
   word   | ndoc | nentry
----------+------+--------
 tsearch  |   18 |     21
 document |   17 |     19
 search   |   17 |     17
 index    |   15 |     15
 use      |   15 |     15
(5 rows)