Skip to content

Build your personal knowledge base with Trilium Notes

Add full text search in autocomplete

SiriusXTe877ad68cf19
diff --git a/src/public/app/services/note_autocomplete.js b/src/public/app/services/note_autocomplete.js
index 77dace69f7..aea46a33d8 100644
--- a/src/public/app/services/note_autocomplete.js
+++ b/src/public/app/services/note_autocomplete.js
@@ -30,6 +30,15 @@ async function autocompleteSourceForCKEditor(queryText) {
}
async function autocompleteSource(term, cb, options = {}, fastSearch = true) {
+ if (fastSearch === false) {
+ cb(
+ [{
+ noteTitle: term,
+ highlightedNotePathTitle: `Searching...`
+ }]
+ );
+ }
+
const activeNoteId = appContext.tabManager.getActiveContextNoteId();
let results = await server.get(`autocomplete?query=${encodeURIComponent(term)}&activeNoteId=${activeNoteId}&fastSearch=${fastSearch}`);