Skip to content

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

:art: Improve search result highlighting https://github.com/siyuan-note/siyuan/issues/15284

Danield70b72f17b20
diff --git a/kernel/model/search.go b/kernel/model/search.go
index 662934772b..e9168a2736 100644
--- a/kernel/model/search.go
+++ b/kernel/model/search.go
@@ -1676,6 +1676,7 @@ func fullTextSearchByLikeWithRoot(query, boxFilter, pathFilter, typeFilter, igno
}
func highlightByFTS(query, typeFilter, id string) (ret []string) {
+ query = strings.ReplaceAll(query, " ", " OR ")
const limit = 256
table := "blocks_fts"
if !Conf.Search.CaseSensitive {