postgrelize / tsHeadline
Function: tsHeadline() ​
tsHeadline(
document,query,options?):Fn
Defined in: src/expressions/search-helpers.ts:187
postgrelize extensionts_headline: a document excerpt with the query terms highlighted. PostgreSQL extension.
Parameters ​
document ​
unknown
Text expression or value, bound as a parameter.
query ​
unknown
tsquery expression.
options? ​
TsHeadlineOptions = {}
Configuration and ts_headline options string.
Returns ​
Function call expression.
Throws ​
Error when config is not a plain or schema-qualified identifier.
Example ​
ts
await Post.findAll({ attributes: [[tsHeadline(col('body'), websearchToTsQuery('cat'), { options: 'StartSel=<b>, StopSel=</b>' }), 'excerpt']] });