core: fix least relevant results shown on top

This commit is contained in:
Abdullah Atta
2024-08-09 11:52:55 +05:00
parent 313807c384
commit c8c1028cbc

View File

@@ -76,7 +76,7 @@ export default class Lookup {
)
.select(["results.id"])
.groupBy("results.id")
.orderBy(sql`SUM(results.rank)`, "asc")
.orderBy(sql`SUM(results.rank)`, "desc")
.$if(!!limit, (eb) => eb.limit(limit!))
// filter out ids that have no note against them