Skip to content

Build your personal knowledge base with Trilium Notes

fix broken saved search, closes #1234

zadam70995a76915b
diff --git a/src/routes/api/search.js b/src/routes/api/search.js
index 177e9fc6bf..4e8a428a15 100644
--- a/src/routes/api/search.js
+++ b/src/routes/api/search.js
@@ -58,7 +58,13 @@ async function searchFromNote(req) {
searchResultNoteIds = await searchFromRelation(note, relationName);
} else {
- searchResultNoteIds = searchService.searchNotes(json.searchString)
+ const searchContext = new SearchContext({
+ includeNoteContent: true,
+ excludeArchived: true,
+ fuzzyAttributeSearch: false
+ });
+
+ searchResultNoteIds = searchService.findNotesWithQuery(json.searchString, searchContext)
.map(sr => sr.noteId);
}
}