我正在使用 PostgreSQL 通过使用tsvector
and来查找文章中匹配的字符串tsquery
。
我阅读了 PostgreSQL 手册 12.3 Controlling Text Search,但没有什么能帮助我获得我想要的确切输出。
询问:
SELECT ts_headline('english',
'The most common type of search
is to find all documents containing given query terms
and return them in order of their similarity to the
query.',
to_tsquery('query & similarity'),
'StartSel = <, StopSel = >');
ts_headline 输出
The most common type of search
is to find all documents containing given <query> terms
and return them in order of their <similarity> to the
<query>.
我正在寻找下面提到的唯一字符串:
查询,相似度