我在PostgreSQL表中有一堆文本行,我试图找到常见的字符串。找到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
但结果相当令人失望。
有什么想法?谢谢!
感谢klin,这听起来像一个很好的方法,我会测试它! – Gab