🎨 Improve box ref indexing
This commit is contained in:
parent
fd22bbba7f
commit
63839cba0c
1 changed files with 5 additions and 2 deletions
|
@ -115,10 +115,15 @@ func unindex(boxID string) {
|
|||
}
|
||||
|
||||
func (box *Box) Index() {
|
||||
task.AppendTask(task.DatabaseIndexRef, removeBoxRefs, box.ID)
|
||||
task.AppendTask(task.DatabaseIndex, index, box.ID)
|
||||
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
|
||||
}
|
||||
|
||||
func removeBoxRefs(boxID string) {
|
||||
sql.DeleteBoxRefsQueue(boxID)
|
||||
}
|
||||
|
||||
func index(boxID string) {
|
||||
box := Conf.Box(boxID)
|
||||
if nil == box {
|
||||
|
@ -219,8 +224,6 @@ func IndexRefs() {
|
|||
luteEngine := util.NewLute()
|
||||
boxes := Conf.GetOpenedBoxes()
|
||||
for _, box := range boxes {
|
||||
sql.DeleteBoxRefsQueue(box.ID)
|
||||
|
||||
pages := pagedPaths(filepath.Join(util.DataDir, box.ID), 32)
|
||||
for _, paths := range pages {
|
||||
for _, treeAbsPath := range paths {
|
||||
|
|
Loading…
Add table
Reference in a new issue