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

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

主站蜘蛛池模板: 共和县| 宝丰县| 辉南县| 叙永县| 天等县| 鄱阳县| 喀喇沁旗| 托克托县| 博野县| 牟定县| 盐源县| 常宁市| 友谊县| 边坝县| 怀远县| 贺兰县| 南雄市| 青龙| 滦南县| 牟定县| 宜君县| 宿州市| 兖州市| 鄂尔多斯市| 沛县| 永顺县| 镇原县| 阿拉善右旗| 双峰县| 泸西县| 庆阳市| 通州市| 宁国市| 谷城县| 桓台县| 新化县| 太和县| 西青区| 邢台市| 林芝县| 凤山县|