mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 21:29:12 +00:00
Fix ranking search results on Obsidian
It's reversed since score of entries is now a distance metric on Khoj server. So lesser distance is better. Previously higher score was better
This commit is contained in:
@@ -106,7 +106,7 @@ export class KhojSearchModal extends SuggestModal<SearchResult> {
|
||||
|
||||
// Combine markdown and PDF results and sort them by score
|
||||
let results = mdData.concat(pdfData)
|
||||
.sort((a: any, b: any) => b.score - a.score)
|
||||
.sort((a: any, b: any) => a.score - b.score)
|
||||
.map((result: any) => { return { entry: result.entry, file: result.file } as SearchResult; })
|
||||
|
||||
this.query = query;
|
||||
|
||||
Reference in New Issue
Block a user