mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01: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:
parent
6d8e889917
commit
c89bd49973
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue