diff --git a/GRDB/FTS/FTS5.swift b/GRDB/FTS/FTS5.swift index 24d9ded5e..74d104f17 100644 --- a/GRDB/FTS/FTS5.swift +++ b/GRDB/FTS/FTS5.swift @@ -310,4 +310,9 @@ return self } } + + extension Column { + /// The FTS5 rank column + public static let rank = Column("rank") + } #endif diff --git a/README.md b/README.md index 4eb31fdde..fc0065f6e 100644 --- a/README.md +++ b/README.md @@ -3725,7 +3725,7 @@ let documents = Document.fetchAll(db, arguments: [pattern]) // Query Interface -let documents = Document.matching(pattern).order(Column("rank")).fetchAll(db) +let documents = Document.matching(pattern).order(Column.rank).fetchAll(db) ``` For more information about the ranking algorithm, as well as extra options, read [Sorting by Auxiliary Function Results](https://www.sqlite.org/fts5.html#sorting_by_auxiliary_function_results)