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

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

主站蜘蛛池模板: 临夏县| 舞阳县| 东阿县| 漳浦县| 新郑市| 凤山县| 页游| 兴国县| 徐闻县| 贵溪市| 石河子市| 天峨县| 布尔津县| 仲巴县| 岗巴县| 阜新| 汨罗市| 黎城县| 高碑店市| 临清市| 泽州县| 敦化市| 敦煌市| 安溪县| 罗江县| 洛阳市| 太白县| 德钦县| 祁连县| 青神县| 来安县| 济宁市| 霍邱县| 清原| 泰兴市| 平定县| 湘潭市| 新巴尔虎右旗| 自治县| 余干县| 和平县|