我正在使用PostgreSQL通过使用tsvector
和tsquery
在文章中找到匹配的字符串。
我阅读了PostgreSQL手册12.3控制文本搜索,但是没有什么可以帮助我获得所需的确切输出。
查询:
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>.
我正在寻找如下所述的唯一字符串:
查询,相似度