【发布时间】:2017-03-09 18:30:59
【问题描述】:
我在 PostgreSQL 表中有一堆文本行,我正在尝试查找常用字符串。
例如,假设我有一个基本表格:
CREATE TABLE a (id serial, value text);
INSERT INTO a (value) VALUES
('I go to the movie theater'),
('New movie theater releases'),
('Coming out this week at your local movie theater'),
('New exposition about learning disabilities at the children museum'),
('The genius found in learning disabilities')
;
我正在尝试在所有行中找到像 movie theater 和 learning disabilities 这样的流行字符串(目标是显示像 Twitter“趋势”这样的“趋势”字符串之王的列表)
我使用全文搜索,并尝试将ts_stat 与ts_headline 结合使用,但结果非常令人失望。
有什么想法吗?谢谢!
【问题讨论】:
标签: sql postgresql full-text-search postgresql-9.6 tsvector