Retrieving the most common keywords from a tsvector column

点点圈 提交于 2019-12-06 07:46:46

问题


I'm considering adding a tsvector column to an existing table that will hold possible search terms for multiple columns in that same table (e.g. the tsvector column will equal to_tsvector(header || ' ' || body || ' ' || footer)). Before I decide to do so, one of my requirements is that I am able to find the most popular keywords amongst all records in the table.

Is there anything similar to tsquery that will find my the most popular keywords over all records?


回答1:


Most probably the ts_stat FTS function is what you're after.



来源:https://stackoverflow.com/questions/1851065/retrieving-the-most-common-keywords-from-a-tsvector-column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!