Order FTS results by rank

This commit is contained in:
Kovid Goyal 2020-06-16 09:41:09 +05:30
parent 9b7f69e4bb
commit a283014fe4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1799,6 +1799,7 @@ class DB(object):
if annotation_type:
query += ' AND annotations.annot_type = ? '
data.append(annotation_type)
query += ' ORDER BY {}.rank '.format(fts_table)
try:
for (rowid, book_id, fmt, user_type, user, annot_data, text) in self.execute(query, tuple(data)):
yield {