Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
for title/content search does not make sense to search for protected notes
zadamee15db0ae13c
diff --git a/src/services/build_search_query.js b/src/services/build_search_query.jsindex cf45638a43..54dbfc325c 100644--- a/src/services/build_search_query.js+++ b/src/services/build_search_query.js@@ -113,6 +113,11 @@ module.exports = function(filters, selectedColumns = 'notes.*') {condition = "NOT(" + condition + ")";}+ if (['text', 'title', 'content'].includes(filter.name)) {+ // for title/content search does not make sense to search for protected notes+ condition = `(${condition} AND notes.isProtected = 0)`;+ }+where += condition;}else if ([">", ">=", "<", "<="].includes(filter.operator)) {