blugeindex

package
v0.0.0-...-fd09a51 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIndexPath = errors.New("invalid index path")
View Source
var ErrLevelDBOpen = errors.New("failed to open the ID database")
View Source
var ErrOfflineIndex = errors.New("offline indexer, operation not supported")

Functions

func NewFilenameAnalyzer

func NewFilenameAnalyzer() *analysis.Analyzer

func NewFilenameTokenizer

func NewFilenameTokenizer() *tokenizer.CharacterTokenizer

Types

type BlugeIndex

type BlugeIndex struct {
	IndexPath string
	BatchSize uint
	// contains filtered or unexported fields
}

func NewBlugeIndex

func NewBlugeIndex(indexPath string, batchSize uint) (*BlugeIndex, error)

func OfflineIndex

func OfflineIndex(indexPath string) (*BlugeIndex, error)

Can be used from a different process

func (*BlugeIndex) Close

func (i *BlugeIndex) Close()

func (*BlugeIndex) Count

func (i *BlugeIndex) Count() (uint64, error)

func (*BlugeIndex) Has

func (i *BlugeIndex) Has(fileID string) (bool, error)

func (*BlugeIndex) Index

func (i *BlugeIndex) Index(docs chan Indexable) chan DocumentIndexed

func (*BlugeIndex) Search

func (i *BlugeIndex) Search(q string, fn func(search.DocumentMatchIterator) error) error

func (*BlugeIndex) SetBatchSize

func (i *BlugeIndex) SetBatchSize(size uint)

type DocumentIndexed

type DocumentIndexed struct {
	Document *bluge.Document
	Error    error
}

type Indexable

type Indexable struct {
	Document *bluge.Document
	Path     string
}

type IndexedDocument

type IndexedDocument struct {
	Document *bluge.Document
	Path     string
	Error    error
}

Jump to

Keyboard shortcuts

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