mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 提供重建单个文档索引的 API https://github.com/siyuan-note/siyuan/issues/5719
This commit is contained in:
parent
0959994e73
commit
da5f467a5e
3 changed files with 33 additions and 0 deletions
|
|
@ -449,6 +449,19 @@ func parseKTree(kramdown []byte) (ret *parse.Tree) {
|
|||
return
|
||||
}
|
||||
|
||||
func ReindexTree(path string) (err error) {
|
||||
luteEngine := NewLute()
|
||||
tree, err := loadTree(path, luteEngine)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
treenode.ReindexBlockTree(tree)
|
||||
sql.UpsertTreeQueue(tree)
|
||||
sql.WaitForWritingDatabase()
|
||||
return
|
||||
}
|
||||
|
||||
func RefreshFileTree() {
|
||||
WaitForWritingFiles()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue