From 7fdaedd468f250355397b906826303d3e8548616 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Tue, 26 Nov 2024 03:52:20 +0000 Subject: [PATCH] also significantly increase noteId matches --- src/services/search/search_result.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/search/search_result.ts b/src/services/search/search_result.ts index a9190674b..9a0f71f9c 100644 --- a/src/services/search/search_result.ts +++ b/src/services/search/search_result.ts @@ -30,9 +30,9 @@ class SearchResult { const normalizedQuery = fulltextQuery.toLowerCase(); const normalizedTitle = note.title.toLowerCase(); - // Note ID exact match + // Note ID exact match, also significantly increase if (note.noteId.toLowerCase() === fulltextQuery) { - this.score += 100; + this.score += 1000; } // Title matching scores - significantly increase the exact match score