Skip to content

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

:art: Supports searching database blocks by the view title https://github.com/siyuan-note/siyuan/issues/9348

Daniel0014a5eea4b1
diff --git a/kernel/conf/search.go b/kernel/conf/search.go
index d1e2771815..31b36d163e 100644
--- a/kernel/conf/search.go
+++ b/kernel/conf/search.go
@@ -189,6 +189,13 @@ func (s *Search) TypeFilter() string {
buf.WriteByte('\'')
buf.WriteString(",")
}
+ if s.DatabaseBlock {
+ buf.WriteByte('\'')
+ buf.WriteString(treenode.TypeAbbr(ast.NodeAttributeView.String()))
+ buf.WriteByte('\'')
+ buf.WriteString(",")
+ }
+
// 无法搜索到 iframe 块、视频块和音频块 https://github.com/siyuan-note/siyuan/issues/3604
buf.WriteString("'iframe','video','audio',")
// 挂件块支持内置属性搜索 https://github.com/siyuan-note/siyuan/issues/4497
diff --git a/kernel/sql/database.go b/kernel/sql/database.go
index 9227cf4544..8d8e0a6b9f 100644
--- a/kernel/sql/database.go
+++ b/kernel/sql/database.go
@@ -1339,6 +1339,8 @@ func nSort(n *ast.Node) int {
return 20
case ast.NodeSuperBlock:
return 30
+ case ast.NodeAttributeView:
+ return 30
case ast.NodeText, ast.NodeTextMark:
if n.IsTextMarkType("tag") {
return 205