Skip to content

Glossary: PostgreSQL Beyond the Basics

ts_rank(), setweight()

Also written: ts_rank, setweight, weights

`ts_rank()` scores how well a vector matches a query. `setweight()` labels lexemes with a weight from A (most important) to D, so matches on A words rank higher.

Where the book teaches it

Related terms

tsvector, tsqueryts_headline()