Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve search https://github.com/siyuan-note/siyuan/issues/13430

Danielfc47230331f3
diff --git a/kernel/model/search.go b/kernel/model/search.go
index 521800df7a..68c8fdc6a0 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -1027,6 +1027,7 @@ func FullTextSearchBlock(query string, boxes, paths []string, types map[string]b
boxFilter := buildBoxesFilter(boxes)
pathFilter := buildPathsFilter(paths)
if 2 > len(strings.Split(strings.TrimSpace(query), " ")) {
+ query = stringQuery(query)
blocks, matchedBlockCount, matchedRootCount = fullTextSearchByQuerySyntax(query, boxFilter, pathFilter, typeFilter, ignoreFilter, orderByClause, beforeLen, page, pageSize)
} else {
docMode = true // 文档全文搜索模式 https://github.com/siyuan-note/siyuan/issues/10584