feat: Search enhancement (#2562)

* feat: ignore AList storage on indexing

* fix: remove unused err in `walkFn`

* chore(ci): fix auto_lang trigger and run it

* feat: batch index

* feat: quit index & init index

* feat: set DocType for bleve data

* fix: build index cleanup check origin err
This commit is contained in:
BoYanZh
2022-12-05 13:28:39 +08:00
committed by GitHub
parent 4e1be9bee6
commit 8c0dfe2f3d
16 changed files with 160 additions and 50 deletions

View File

@ -14,9 +14,9 @@ import (
// WalkFS will stop when current depth > `depth`. For each visited node,
// WalkFS calls walkFn. If a visited file system node is a directory and
// walkFn returns path.SkipDir, walkFS will skip traversal of this node.
func WalkFS(ctx context.Context, depth int, name string, info model.Obj, walkFn func(reqPath string, info model.Obj, err error) error) error {
func WalkFS(ctx context.Context, depth int, name string, info model.Obj, walkFn func(reqPath string, info model.Obj) error) error {
// This implementation is based on Walk's code in the standard path/path package.
walkFnErr := walkFn(name, info, nil)
walkFnErr := walkFn(name, info)
if walkFnErr != nil {
if info.IsDir() && walkFnErr == filepath.SkipDir {
return nil