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: 嵌入块支持搜索 https://github.com/siyuan-note/siyuan/issues/7112
Liang Ding50c9616d7b10
diff --git a/kernel/model/search.go b/kernel/model/search.goindex d6f1408361..0ba4dad2ac 100644--- a/kernel/model/search.go+++ b/kernel/model/search.go@@ -58,6 +58,11 @@ func searchEmbedBlock(embedBlockID, stmt string, excludeIDs []string, headingModsqlBlocks := sql.SelectBlocksRawStmtNoParse(stmt, Conf.Search.Limit)var tmp []*sql.Blockfor _, b := range sqlBlocks {+ if "query_embed" == b.Type { // 嵌入块不再嵌入+ // 嵌入块支持搜索 https://github.com/siyuan-note/siyuan/issues/7112+ // 这里会导致上面的 limit 限制不准确,导致结果变少,暂时没有解决方案,只能靠用户自己调整 SQL,加上 type != 'query_embed' 的条件+ continue+ }if !gulu.Str.Contains(b.ID, excludeIDs) {tmp = append(tmp, b)}@@ -494,6 +499,7 @@ func buildTypeFilter(types map[string]bool) string {s.SuperBlock = types["superBlock"]s.Paragraph = types["paragraph"]s.HTMLBlock = types["htmlBlock"]+ s.EmbedBlock = types["embedBlock"]} else {s.Document = Conf.Search.Documents.Heading = Conf.Search.Heading@@ -506,6 +512,7 @@ func buildTypeFilter(types map[string]bool) string {s.SuperBlock = Conf.Search.SuperBlocks.Paragraph = Conf.Search.Paragraphs.HTMLBlock = Conf.Search.HTMLBlock+ s.EmbedBlock = Conf.Search.EmbedBlock}return s.TypeFilter()}