plg_search_sqlitefts

package
v0.0.0-...-bec2cf3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PHASE_EXPLORE  = "PHASE_EXPLORE"
	PHASE_INDEXING = "PHASE_INDEXING"
	PHASE_MAINTAIN = "PHASE_MAINTAIN"
	PHASE_PAUSE    = "PHASE_PAUSE"
)
View Source
const MAX_HEAP_SIZE = 100000

Variables

View Source
var (
	SEARCH_ENABLE      func() bool
	SEARCH_PROCESS_MAX func() int
	SEARCH_PROCESS_PAR func() int
	SEARCH_REINDEX     func() int
	CYCLE_TIME         func() int
	INDEXING_EXT       func() string
	MAX_INDEXING_FSIZE func() int
	INDEXING_EXCLUSION = []string{
		"/node_modules/", "/bower_components/",
		"/.cache/", "/.npm/", "/.git/",
	}
)

Functions

This section is empty.

Types

type Document

type Document struct {
	Hash        string    `json:"-"`
	Type        string    `json:"type"`
	Name        string    `json:"name"`
	Path        string    `json:"path"`
	InitialPath string    `json:"-"`
	Ext         string    `json:"ext"`
	ModTime     time.Time `json:"time"`
	Size        int64     `json:"size"`
	Content     []byte    `json:"content"`
	Priority    int       `json:"-"`
}

type HeapDoc

type HeapDoc []*Document

https://golang.org/pkg/container/heap/

func (HeapDoc) Len

func (h HeapDoc) Len() int

func (HeapDoc) Less

func (h HeapDoc) Less(i, j int) bool

func (*HeapDoc) Pop

func (h *HeapDoc) Pop() interface{}

func (*HeapDoc) Push

func (h *HeapDoc) Push(x interface{})

func (HeapDoc) Swap

func (h HeapDoc) Swap(i, j int)

type SearchHint

type SearchHint struct{}

func (SearchHint) Cat

func (this SearchHint) Cat(ctx *App, path string) error

func (SearchHint) Ls

func (this SearchHint) Ls(ctx *App, path string) error

func (SearchHint) Mkdir

func (this SearchHint) Mkdir(ctx *App, path string) error

func (SearchHint) Mv

func (this SearchHint) Mv(ctx *App, from string, to string) error

func (SearchHint) Rm

func (this SearchHint) Rm(ctx *App, path string) error

func (SearchHint) Save

func (this SearchHint) Save(ctx *App, path string) error

func (SearchHint) Touch

func (this SearchHint) Touch(ctx *App, path string) error

type SearchIndexer

type SearchIndexer struct {
	Id             string
	FoldersUnknown HeapDoc
	CurrentPhase   string
	Backend        IBackend
	DBPath         string
	DB             *sql.DB
	// contains filtered or unexported fields
}

func NewSearchIndexer

func NewSearchIndexer(id string, b IBackend) SearchIndexer

func (*SearchIndexer) Consolidate

func (this *SearchIndexer) Consolidate(tx *sql.Tx) bool

func (*SearchIndexer) Discover

func (this *SearchIndexer) Discover(tx *sql.Tx) bool

func (*SearchIndexer) Execute

func (this *SearchIndexer) Execute()

func (*SearchIndexer) Indexing

func (this *SearchIndexer) Indexing(tx *sql.Tx) bool

type SearchProcess

type SearchProcess struct {
	// contains filtered or unexported fields
}
var SProc SearchProcess = SearchProcess{
	// contains filtered or unexported fields
}

func (*SearchProcess) HintFile

func (this *SearchProcess) HintFile(app *App, path string)

func (*SearchProcess) HintLs

func (this *SearchProcess) HintLs(app *App, path string) *SearchIndexer

func (*SearchProcess) HintRm

func (this *SearchProcess) HintRm(app *App, path string)

func (*SearchProcess) Peek

func (this *SearchProcess) Peek() *SearchIndexer

func (*SearchProcess) Reset

func (this *SearchProcess) Reset()

type SqliteSearch

type SqliteSearch struct {
	Hint *SearchHint
}

func (SqliteSearch) Query

func (this SqliteSearch) Query(app App, path string, keyword string) ([]IFile, error)

Jump to

Keyboard shortcuts

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