Skip to content

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

:art: 搜索支持按文档分组展现搜索结果 https://github.com/siyuan-note/siyuan/issues/4772

Liang Dingb84ce0506f70
diff --git a/kernel/model/search.go b/kernel/model/search.go
index b24dc5ee71..4aecae3fe7 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -289,6 +289,9 @@ func FullTextSearchBlock(query, box, path string, types map[string]bool, querySy
default:
ret = blocks
}
+ if 1 > len(ret) {
+ ret = []*Block{}
+ }
return
}