mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-15 03:28:07 +01:00
🐛 搜索设置忽略大小写时结果统计不正确 Fix https://github.com/siyuan-note/siyuan/issues/6664
This commit is contained in:
parent
844491d5f1
commit
4650eec7c6
1 changed files with 6 additions and 1 deletions
|
|
@ -378,7 +378,12 @@ func fullTextSearchCount(query, box, path, filter string) (matchedBlockCount, ma
|
|||
return
|
||||
}
|
||||
|
||||
stmt := "SELECT COUNT(id) AS `matches`, COUNT(DISTINCT(root_id)) AS `docs` FROM `blocks_fts` WHERE `blocks_fts` MATCH '" + columnFilter() + ":(" + query + ")' AND type IN " + filter
|
||||
table := "blocks_fts" // 大小写敏感
|
||||
if !Conf.Search.CaseSensitive {
|
||||
table = "blocks_fts_case_insensitive"
|
||||
}
|
||||
|
||||
stmt := "SELECT COUNT(id) AS `matches`, COUNT(DISTINCT(root_id)) AS `docs` FROM `" + table + "` WHERE `" + table + "` MATCH '" + columnFilter() + ":(" + query + ")' AND type IN " + filter
|
||||
if "" != box {
|
||||
stmt += " AND box = '" + box + "'"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue