mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Order FTS results by rank
This commit is contained in:
parent
9b7f69e4bb
commit
a283014fe4
@ -1799,6 +1799,7 @@ class DB(object):
|
|||||||
if annotation_type:
|
if annotation_type:
|
||||||
query += ' AND annotations.annot_type = ? '
|
query += ' AND annotations.annot_type = ? '
|
||||||
data.append(annotation_type)
|
data.append(annotation_type)
|
||||||
|
query += ' ORDER BY {}.rank '.format(fts_table)
|
||||||
try:
|
try:
|
||||||
for (rowid, book_id, fmt, user_type, user, annot_data, text) in self.execute(query, tuple(data)):
|
for (rowid, book_id, fmt, user_type, user, annot_data, text) in self.execute(query, tuple(data)):
|
||||||
yield {
|
yield {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user