This commit is contained in:
Liang Ding 2022-07-28 01:14:49 +08:00
parent 6eed263539
commit 60bef349a0
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 54 additions and 9 deletions

View file

@ -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,
}
}