官术网_书友最值得收藏!

Gathering word statistics

Full-text search can handle a lot of data. To give end users more insights into their texts, PostgreSQL offers the pg_stat function, which returns a list of words:

SELECT * FROM ts_stat('SELECT to_tsvector(''english'', comment) FROM pg_available_extensions') ORDER BY 2 DESC LIMIT 3; 
word | ndoc | nentry ----------+------+-------- function | 10 | 10 data | 10 | 10 type | 7 | 7 (3 rows)

The word column contains the stemmed word, ndoc tells us about the number of documents a certain word occurs. nentry indicates how often a word was found all together.

主站蜘蛛池模板: 美姑县| 辰溪县| 湾仔区| 湘阴县| 吉林市| 天津市| 安化县| 梅河口市| 平陆县| 东莞市| 东阳市| 周至县| 丰县| 桐梓县| 稷山县| 长汀县| 雅江县| 本溪| 罗江县| 基隆市| 扎鲁特旗| 宁化县| 紫金县| 合江县| 永善县| 广灵县| 鹤岗市| 家居| 高台县| 乌拉特前旗| 乐安县| 阿荣旗| 达尔| 建湖县| 商城县| 资中县| 会昌县| 嘉兴市| 长子县| 神农架林区| 蒙山县|