mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
make sure exact noteId match comes on the top in search
This commit is contained in:
parent
ba34df2e15
commit
c666fc3b98
@ -22,6 +22,10 @@ class SearchResult {
|
|||||||
|
|
||||||
const note = becca.notes[this.noteId];
|
const note = becca.notes[this.noteId];
|
||||||
|
|
||||||
|
if (note.noteId.toLowerCase() === fulltextQuery) {
|
||||||
|
this.score += 100;
|
||||||
|
}
|
||||||
|
|
||||||
if (note.title.toLowerCase() === fulltextQuery) {
|
if (note.title.toLowerCase() === fulltextQuery) {
|
||||||
this.score += 100; // high reward for exact match #3470
|
this.score += 100; // high reward for exact match #3470
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user