Skip to content

Build your personal knowledge base with Trilium Notes

make sure exact noteId match comes on the top in search

zadamc666fc3b981d
diff --git a/src/services/search/search_result.js b/src/services/search/search_result.js
index 4c678661de..ca3811f8ec 100644
--- a/src/services/search/search_result.js
+++ b/src/services/search/search_result.js
@@ -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
}