从tsvector列中检索最常见的关键字 [英] Retrieving the most common keywords from a tsvector column

查看:126
本文介绍了从tsvector列中检索最常见的关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑将tsvector列添加到现有的表中,该列将保存同一表中多个列的可能搜索项(例如,tsvector列将等于 to_tsvector(header |||| ||))。 body ||''|| footer))。在我决定这样做之前,我的一个要求是我能够在表中的所有记录中找到最流行的关键字。



是否有类似于tsquery那会发现我所有记录中最流行的关键字? 大多数情况下, ts_stat FTS功能就是您要做的。


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?

解决方案

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

这篇关于从tsvector列中检索最常见的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆