fix(search): allow indexed check (close #3103)

pull/3117/head v3.9.1
Noah Hsu 2023-01-19 17:00:49 +08:00
parent 98872a8fdb
commit 9b99e8ab70
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,8 @@ func BuildIndex(ctx context.Context, indexPaths, ignorePaths []string, maxDepth
objCount uint64 = 0 objCount uint64 = 0
fi model.Obj fi model.Obj
) )
log.Infof("build index for: %+v", indexPaths)
log.Infof("ignore paths: %+v", ignorePaths)
Running.Store(true) Running.Store(true)
Quit = make(chan struct{}, 1) Quit = make(chan struct{}, 1)
indexMQ := mq.NewInMemoryMQ[ObjWithParent]() indexMQ := mq.NewInMemoryMQ[ObjWithParent]()

View File

@ -53,9 +53,10 @@ func updateIgnorePaths() {
res, err := base.RestyClient.R().Get(url) res, err := base.RestyClient.R().Get(url)
if err == nil { if err == nil {
allowIndexed = utils.Json.Get(res.Body(), "data", conf.AllowIndexed).ToBool() allowIndexed = utils.Json.Get(res.Body(), "data", conf.AllowIndexed).ToBool()
v3Visited[addition.Address] = allowIndexed
} }
} }
if allowIndexed { if !allowIndexed {
ignorePaths = append(ignorePaths, storage.GetStorage().MountPath) ignorePaths = append(ignorePaths, storage.GetStorage().MountPath)
} }
} else { } else {