🎨 Database filtering follows search case sensitive settings https://github.com/siyuan-note/siyuan/issues/16585

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-17 18:20:30 +08:00
parent feaa7938ff
commit e1ebb1f151
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 38 additions and 9 deletions

View file

@ -846,9 +846,16 @@ func filterByQuery(query string, collection av.Collection) {
for _, cell := range item.GetValues() {
allKeywordsHit := true
for _, keyword := range keywords {
if !strings.Contains(strings.ToLower(cell.String(true)), strings.ToLower(keyword)) {
allKeywordsHit = false
break
if !util.SearchCaseSensitive {
if !strings.Contains(strings.ToLower(cell.String(true)), strings.ToLower(keyword)) {
allKeywordsHit = false
break
}
} else {
if !strings.Contains(cell.String(true), keyword) {
allKeywordsHit = false
break
}
}
}
if allKeywordsHit {

View file

@ -376,6 +376,8 @@ func SetCaseSensitive(b bool) {
} else {
db.Exec("PRAGMA case_sensitive_like = OFF;")
}
util.SearchCaseSensitive = b
}
func SetIndexAssetPath(b bool) {