This commit is contained in:
Daniel 2024-12-08 23:09:06 +08:00
parent 497037465b
commit 67f64f7b2b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 3 additions and 3 deletions

View file

@ -1459,8 +1459,7 @@ func fullTextSearchCountByFTS(query, boxFilter, pathFilter, typeFilter, ignoreFi
}
func fullTextSearchByLikeWithRoot(query, boxFilter, pathFilter, typeFilter, ignoreFilter, orderBy string, beforeLen, page, pageSize int) (ret []*Block, matchedBlockCount, matchedRootCount int) {
query = strings.ReplaceAll(query, "'", "''")
query = strings.ReplaceAll(query, "\"", "\"\"")
query = strings.ReplaceAll(query, "'", "''") // 不需要转义双引号,因为条件都是通过单引号包裹的,只需要转义单引号即可
keywords := strings.Split(query, " ")
contentField := columnConcat()
var likeFilter string