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: Block ref search and global search results display reference counts https://github.com/siyuan-note/siyuan/issues/15721
Daniel1cac4ae55b24
diff --git a/kernel/model/search.go b/kernel/model/search.goindex 4a58450612..d328142419 100644--- a/kernel/model/search.go+++ b/kernel/model/search.go@@ -1323,12 +1323,24 @@ func FullTextSearchBlock(query string, boxes, paths []string, types map[string]bvar nodeIDs []stringfor _, b := range ret {- nodeIDs = append(nodeIDs, b.ID)+ if 0 == groupBy {+ nodeIDs = append(nodeIDs, b.ID)+ } else {+ for _, c := range b.Children {+ nodeIDs = append(nodeIDs, c.ID)+ }+ }}refCount := sql.QueryRefCount(nodeIDs)for _, b := range ret {- b.RefCount = refCount[b.ID]+ if 0 == groupBy {+ b.RefCount = refCount[b.ID]+ } else {+ for _, c := range b.Children {+ c.RefCount = refCount[c.ID]+ }+ }}return}