bleve

package
v1.18.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlushingBatch

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

FlushingBatch is a batch of operations that automatically flushes to the underlying index once it reaches a certain size.

func NewFlushingBatch

func NewFlushingBatch(index bleve.Index, maxBatchSize int) *FlushingBatch

NewFlushingBatch creates a new flushing batch for the specified index. Once the number of operations in the batch reaches the specified limit, the batch automatically flushes its operations to the index.

func (*FlushingBatch) Delete

func (b *FlushingBatch) Delete(id string) error

Delete add a delete index to batch

func (*FlushingBatch) Flush

func (b *FlushingBatch) Flush() error

Flush submit the batch and create a new one

func (*FlushingBatch) Index

func (b *FlushingBatch) Index(id string, data interface{}) error

Index add a new index to batch

Jump to

Keyboard shortcuts

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