mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 文件历史支持按文档名搜索 Fix https://github.com/siyuan-note/siyuan/issues/6257
This commit is contained in:
parent
ae98a6dba5
commit
16e2bc6904
2 changed files with 13 additions and 7 deletions
|
|
@ -343,7 +343,11 @@ func FullTextSearchHistory(query, box, op string, typ, page int) (ret []*History
|
|||
stmt += "1=1"
|
||||
}
|
||||
|
||||
if HistoryTypeDoc == typ {
|
||||
if HistoryTypeDocName == typ {
|
||||
stmt = strings.ReplaceAll(stmt, "{title content}", "{title}")
|
||||
}
|
||||
|
||||
if HistoryTypeDocName == typ || HistoryTypeDoc == typ {
|
||||
if "all" != op {
|
||||
stmt += " AND op = '" + op + "'"
|
||||
}
|
||||
|
|
@ -578,8 +582,9 @@ func ReindexHistory() (err error) {
|
|||
var validOps = []string{HistoryOpClean, HistoryOpUpdate, HistoryOpDelete, HistoryOpFormat, HistoryOpSync}
|
||||
|
||||
const (
|
||||
HistoryTypeDoc = 0
|
||||
HistoryTypeAsset = 1
|
||||
HistoryTypeDocName = 0
|
||||
HistoryTypeDoc = 1
|
||||
HistoryTypeAsset = 2
|
||||
)
|
||||
|
||||
func indexHistoryDir(name string, luteEngine *lute.Lute) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue