我在 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
但结果非常令人失望。
有什么想法吗?谢谢!