search

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Quit = atomic.Pointer[chan struct{}]{}
)

Functions

func BatchIndex

func BatchIndex(ctx context.Context, objs []ObjWithParent) error

func BuildIndex

func BuildIndex(ctx context.Context, indexPaths, ignorePaths []string, maxDepth int, count bool) error

func Clear

func Clear(ctx context.Context) error

func Config

func Config(ctx context.Context) searcher.Config

func Del

func Del(ctx context.Context, prefix string) error

func Index

func Index(ctx context.Context, parent string, obj model.Obj) error

func Init

func Init(mode string) error

Init or reset index

func Progress

func Progress() (*model.IndexProgress, error)

func Running

func Running() bool
func Search(ctx context.Context, req model.SearchReq) ([]model.SearchNode, int64, error)

func Update

func Update(parent string, objs []model.Obj)

func WriteProgress

func WriteProgress(progress *model.IndexProgress)

Types

type ObjWithParent

type ObjWithParent struct {
	Parent string
	model.Obj
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL