mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
⚡ Return document blocks when search hits different block content https://github.com/siyuan-note/siyuan/issues/10584
This commit is contained in:
parent
14057d6714
commit
ee788ee28a
1 changed files with 1 additions and 3 deletions
|
|
@ -1441,9 +1441,8 @@ func fullTextSearchByFTSWithRoot(query, boxFilter, pathFilter, typeFilter, ignor
|
||||||
}
|
}
|
||||||
if 0 < len(resultBlocks) {
|
if 0 < len(resultBlocks) {
|
||||||
matchedRootCount = int(result[0]["docs"].(int64))
|
matchedRootCount = int(result[0]["docs"].(int64))
|
||||||
|
matchedBlockCount = matchedRootCount
|
||||||
}
|
}
|
||||||
logging.LogInfof("time cost [main search]: %v", time.Since(start))
|
|
||||||
now := time.Now()
|
|
||||||
|
|
||||||
keywords = gulu.Str.RemoveDuplicatedElem(keywords)
|
keywords = gulu.Str.RemoveDuplicatedElem(keywords)
|
||||||
terms := strings.Join(keywords, search.TermSep)
|
terms := strings.Join(keywords, search.TermSep)
|
||||||
|
|
@ -1452,7 +1451,6 @@ func fullTextSearchByFTSWithRoot(query, boxFilter, pathFilter, typeFilter, ignor
|
||||||
ret = []*Block{}
|
ret = []*Block{}
|
||||||
}
|
}
|
||||||
|
|
||||||
logging.LogInfof("time cost [highlight search]: %v", time.Since(now))
|
|
||||||
logging.LogInfof("time cost [all]: %v", time.Since(start))
|
logging.LogInfof("time cost [all]: %v", time.Since(start))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue