什么是高级?这就叫高级—openGauss(340)

27 阅读1分钟

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/

这是使用标准化排序的相同例子:

openGauss=# SELECT id, title, ts_rank_cd(to_tsvector(body), query, 32 /* rank/(rank+1) */ ) AS rank 
FROM tsearch.pgweb, to_tsquery('america') query 
WHERE  query @@ to_tsvector(body) 
ORDER BY rank DESC 
LIMIT 10;
 id |  title  |   rank   
----+---------+----------
 11 | Brazil  |  .166667
  2 | America | .0909091
 12 | Canada  | .0909091
 13 | Mexico  | .0909091
(4 rows)

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/