bleve

package
v5.0.0-...-4117378 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRotationSize = int64(200 * 1024 * 1024)
	DefaultBatchSize    = int64(2000)
	DefaultMappingName  = "docs"
)
View Source
const (
	BufferedChanSize = 10000
	MinRotationSize  = 68 * 1024
)

Variables

This section is empty.

Functions

func OpenPool

func OpenPool(ctx context.Context, uu string) (storage.Storage, error)

Types

type BleveConfig

type BleveConfig struct {
	BlevePath    string
	MappingName  string
	RotationSize int64
	BatchSize    int64
}

type Indexer

type Indexer struct {
	// contains filtered or unexported fields
}

Indexer is the syslog specific implementation of the Log server

func (*Indexer) As

func (s *Indexer) As(i interface{}) bool

func (*Indexer) Close

func (s *Indexer) Close(ctx context.Context) error

func (*Indexer) CloseAndDrop

func (s *Indexer) CloseAndDrop(ctx context.Context) error

CloseAndDrop implements storage.Dropper

func (*Indexer) Count

func (s *Indexer) Count(ctx context.Context, qu interface{}) (int, error)

func (*Indexer) DeleteMany

func (s *Indexer) DeleteMany(ctx context.Context, qu interface{}) (int32, error)

func (*Indexer) DeleteOne

func (s *Indexer) DeleteOne(ctx context.Context, data interface{}) error

func (*Indexer) FindMany

func (s *Indexer) FindMany(ctx context.Context, qu interface{}, offset, limit int32, sortFields string, sortDesc bool, customCodec indexer.IndexCodex) (chan interface{}, error)

func (*Indexer) GetCodex

func (s *Indexer) GetCodex() indexer.IndexCodex

func (*Indexer) ID

func (s *Indexer) ID() string

func (*Indexer) Init

func (s *Indexer) Init(ctx context.Context, conf configx.Values) error

func (*Indexer) InsertOne

func (s *Indexer) InsertOne(ctx context.Context, data any) error

func (*Indexer) Metadata

func (s *Indexer) Metadata() map[string]string

func (*Indexer) MustBleveConfig

func (s *Indexer) MustBleveConfig(ctx context.Context) *BleveConfig

func (*Indexer) Name

func (s *Indexer) Name() string

func (*Indexer) NewBatch

func (s *Indexer) NewBatch(ctx context.Context, opts ...indexer.BatchOption) (indexer.Batch, error)

func (*Indexer) Resync

func (s *Indexer) Resync(ctx context.Context, logger func(string)) error

Resync creates a copy of current index. It has been originally used for switching analyze format from bleve to scorch.

func (*Indexer) Search

func (s *Indexer) Search(ctx context.Context, qu *bleve.SearchRequest, res *[]index.Document) error

func (*Indexer) SetCodex

func (s *Indexer) SetCodex(c indexer.IndexCodex)

func (*Indexer) Stats

func (s *Indexer) Stats(ctx context.Context) map[string]interface{}

Stats implements DAO method by listing closed indexes and documents counts

func (*Indexer) Truncate

func (s *Indexer) Truncate(ctx context.Context, max int64, logger func(string)) error

Truncate gathers size of existing indexes, starting from last. When max is reached it starts deleting all previous indexes.

Jump to

Keyboard shortcuts

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