make sure exact noteId match comes on the top in search

This commit is contained in:
zadam 2023-10-18 09:33:24 +02:00
parent ba34df2e15
commit c666fc3b98

View File

@ -22,6 +22,10 @@ class SearchResult {
const note = becca.notes[this.noteId];
if (note.noteId.toLowerCase() === fulltextQuery) {
this.score += 100;
}
if (note.title.toLowerCase() === fulltextQuery) {
this.score += 100; // high reward for exact match #3470
}