🎨 数据历史文档中支持操作类型过滤 https://github.com/siyuan-note/siyuan/issues/5754

This commit is contained in:
Liang Ding 2022-08-30 17:03:59 +08:00
parent 150ebe2d1a
commit 49e6d708d6
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -283,7 +283,7 @@ func FullTextSearchHistory(query, box, op string, typ, page int) (ret []*History
}
if HistoryTypeDoc == typ {
stmt += " AND path LIKE '%/" + box + "/%'"
stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'"
} else if HistoryTypeAsset == typ {
stmt += " AND path LIKE '%/assets/%'"
}
@ -494,6 +494,7 @@ func ReindexHistory() (err error) {
return
}
sql.InitHistoryDatabase(true)
lutEngine := NewLute()
for _, historyDir := range historyDirs {
if !historyDir.IsDir() {