An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 改进搜索指定路径后不指定关键字的行为 Fix https://github.com/siyuan-note/siyuan/issues/6959
Liang Ding22a233d9b878
diff --git a/kernel/model/search.go b/kernel/model/search.goindex 923226f590..0f11a4dc16 100644--- a/kernel/model/search.go+++ b/kernel/model/search.go@@ -603,7 +603,7 @@ func fullTextSearchByRegexp(exp, boxFilter, pathFilter, typeFilter, orderBy striexp = regexp.QuoteMeta(exp)fieldFilter := fieldRegexp(exp)- stmt := "SELECT * FROM `blocks` WHERE (" + fieldFilter + ") AND type IN " + typeFilter+ stmt := "SELECT * FROM `blocks` WHERE " + fieldFilter + " AND type IN " + typeFilterstmt += boxFilter + pathFilterstmt += " " + orderBystmt += " LIMIT " + strconv.Itoa(Conf.Search.Limit)@@ -808,6 +808,7 @@ func maxContent(content string, maxLen int) string {func fieldRegexp(regexp string) string {buf := bytes.Buffer{}+ buf.WriteString("(")buf.WriteString("content REGEXP '")buf.WriteString(regexp)buf.WriteString("'")@@ -833,7 +834,7 @@ func fieldRegexp(regexp string) string {}buf.WriteString(" OR tag REGEXP '")buf.WriteString(regexp)- buf.WriteString("'")+ buf.WriteString("')")return buf.String()}