rank property

Expression<double> get rank

The relevance of a match found by an fts5 query, as computed by bm25 with default weights.

This is a hidden column that sqlite adds to every fts5 table. It can only be used in statements that also use match on this table.

Matches with a higher relevance evaluate to smaller values, so ordering by this expression in ascending order returns the best matches first.

select(emails)
  ..where(emails.match('hello'))
  ..orderBy([(u) => OrderingTerm(expression: emails.rank)]);

See the sqlite documentation for details.

Implementation

Expression<double> get rank => GeneratedColumn<double>(
  'rank',
  aliasedName,
  true,
  type: DriftSqlType.double,
);