{"Entry":{"collection":"func","key":"ts-rank","name":"ts_rank","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.3"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"d70f1d43f3114685e615a146d3386d3618c915c6a0bd174e0da95c1828d56c6e","first_version":"8.3","group":"textsearch","group_label":"Text Search Functions And Operators","groups":["textsearch"],"imported_at":"2026-09-27T17:57:28.729475+08:00","last_version":"20","name":"ts_rank","name_key":"ts_rank","position":12018,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"ts_rank ( [ weights real[], ] vector tsvector, query tsquery [, normalization integer ] ) → real","signature_count":1,"slug":"ts-rank","source_rev":"b7bd9cda","summary":"Computes a score showing how well the vector matches the query.","summary_zh":""}},"Definition":{"Collection":"func","Key":"ts-rank","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"ts-rank","SourceRevision":"b7bd9cda","Facts":{"description":"Computes a score showing how well the vector matches the query. See Section 12.3.3 for details.","description_html":"Computes a score showing how well the \u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e matches the \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e. See \u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" title=\"12.3.3. Ranking Search Results\"\u003eSection 12.3.3\u003c/a\u003e for details.","description_zh":"","description_zh_html":"","doc":{"anchor":"TEXTSEARCH-FUNCTIONS-TABLE","file":"functions-textsearch.html","slug":"18"},"group":"textsearch","group_label":"Text Search Functions And Operators","lang":"en","layout":"table-new","pages":["functions-textsearch.html"],"prose_only":false,"signatures":[{"description":"Computes a score showing how well the vector matches the query. See Section 12.3.3 for details.","description_html":"Computes a score showing how well the \u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e matches the \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e. See \u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" title=\"12.3.3. Ranking Search Results\"\u003eSection 12.3.3\u003c/a\u003e for details.","description_zh":"","description_zh_html":"","examples":[{"expr":"ts_rank(to_tsvector('raining cats and dogs'), 'cat')","result":"0.06079271"}],"html":"\u003ccode class=\"function\"\u003ets_rank\u003c/code\u003e ( [ \u003cspan class=\"optional\"\u003e\u003cem class=\"parameter\"\u003e\u003ccode\u003eweights\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ereal[]\u003c/code\u003e,\u003c/span\u003e ] \u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etsvector\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enormalization\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003ereal\u003c/code\u003e","returns":"real","text":"ts_rank ( [ weights real[], ] vector tsvector, query tsquery [, normalization integer ] ) → real","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"TEXTSEARCH-FUNCTIONS-TABLE","file":"functions-textsearch.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"ts-rank","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"ts_rank","Summary":"计算一个分数，显示vector与query的匹配程度。详情请参见第 12.3.3 节。","BodyHTML":"计算一个分数，显示\u003cem\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e与\u003cem\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e的匹配程度。详情请参见\u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" rel=\"nofollow\"\u003e第 12.3.3 节\u003c/a\u003e。\u003cpre\u003ets_rank ( [ weights real[], ] vector tsvector, query tsquery [, normalization integer ] ) → real\u003c/pre\u003e计算一个分数，显示\u003cem\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e与\u003cem\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e的匹配程度。详情请参见\u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" rel=\"nofollow\"\u003e第 12.3.3 节\u003c/a\u003e。","SourceRevision":"1b5ca64c","ContentHash":"5bb0a9e09247534c9e22ec5eb5ddb88692aa7cbee792f08b551ae9aec57c91c7","Payload":{"description_zh":"计算一个分数，显示vector与query的匹配程度。详情请参见第 12.3.3 节。","description_zh_html":"计算一个分数，显示\u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e与\u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e的匹配程度。详情请参见\u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" title=\"12.3.3. 搜索结果排名\"\u003e第 12.3.3 节\u003c/a\u003e。","signatures":[{"description_zh":"计算一个分数，显示vector与query的匹配程度。详情请参见第 12.3.3 节。","description_zh_html":"计算一个分数，显示\u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e与\u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e的匹配程度。详情请参见\u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" title=\"12.3.3. 搜索结果排名\"\u003e第 12.3.3 节\u003c/a\u003e。","returns":"real","text":"ts_rank ( [ weights real[], ] vector tsvector, query tsquery [, normalization integer ] ) → real","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"6546b3125db2ee5e5c22db776d0a98c0820733e8f35b4f82ec5840d7ec1408b4","Text":"ts_rank ( [ weights real[], ] vector tsvector, query tsquery [, normalization integer ] ) → real","Returns":"real","Payload":{"description":"Computes a score showing how well the vector matches the query. See Section 12.3.3 for details.","description_html":"Computes a score showing how well the \u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e matches the \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e. See \u003ca href=\"/docs/18/textsearch-controls.html#TEXTSEARCH-RANKING\" title=\"12.3.3. Ranking Search Results\"\u003eSection 12.3.3\u003c/a\u003e for details.","description_zh":"","description_zh_html":"","examples":[{"expr":"ts_rank(to_tsvector('raining cats and dogs'), 'cat')","result":"0.06079271"}],"html":"\u003ccode class=\"function\"\u003ets_rank\u003c/code\u003e ( [ \u003cspan class=\"optional\"\u003e\u003cem class=\"parameter\"\u003e\u003ccode\u003eweights\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ereal[]\u003c/code\u003e,\u003c/span\u003e ] \u003cem class=\"parameter\"\u003e\u003ccode\u003evector\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etsvector\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003equery\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etsquery\u003c/code\u003e [\u003cspan class=\"optional\"\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003enormalization\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e\u003c/span\u003e ] ) → \u003ccode class=\"returnvalue\"\u003ereal\u003c/code\u003e","returns":"real","text":"ts_rank ( [ weights real[], ] vector tsvector, query tsquery [, normalization integer ] ) → real","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
