mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
🎨 搜索结果加入命中统计 https://github.com/siyuan-note/siyuan/issues/5505
This commit is contained in:
parent
6eed263539
commit
60bef349a0
2 changed files with 54 additions and 9 deletions
|
|
@ -206,6 +206,10 @@ func fullTextSearchBlock(c *gin.Context) {
|
|||
if nil != querySyntaxArg {
|
||||
querySyntax = querySyntaxArg.(bool)
|
||||
}
|
||||
blocks := model.FullTextSearchBlock(query, box, path, types, querySyntax)
|
||||
ret.Data = blocks
|
||||
blocks, matchedBlockCount, matchedRootCount := model.FullTextSearchBlock(query, box, path, types, querySyntax)
|
||||
ret.Data = map[string]interface{}{
|
||||
"blocks": blocks,
|
||||
"matchedBlockCount": matchedBlockCount,
|
||||
"matchedRootCount": matchedRootCount,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue