bleve

package
v2.1.4-hotfix1+incompa... Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package bleve implements the search engine using a Bleve indexer.

Index

Constants

This section is empty.

Variables

View Source
var (
	BleveIndexPath = ""
	BatchSize      = 2000
)

Functions

This section is empty.

Types

type Batch added in v1.5.0

type Batch struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Batch avoids overflowing bleve index by batching indexation events (index/delete)

func NewBatch added in v1.5.0

func NewBatch(options BatchOptions) *Batch

func (*Batch) Delete added in v1.5.0

func (b *Batch) Delete(uuid string)

func (*Batch) Flush added in v1.5.0

func (b *Batch) Flush(index bleve.Index) error

func (*Batch) Index added in v1.5.0

func (b *Batch) Index(i *tree.IndexableNode)

func (*Batch) LoadIndexableNode added in v1.5.0

func (b *Batch) LoadIndexableNode(indexNode *tree.IndexableNode, excludes map[string]struct{}) error

func (*Batch) NamespacesProvider added in v1.5.0

func (b *Batch) NamespacesProvider() *meta.NamespacesProvider

func (*Batch) Size added in v1.5.0

func (b *Batch) Size() int

type BatchOptions added in v1.5.0

type BatchOptions struct {
	IndexContent bool
}

type BleveServer

type BleveServer struct {
	Router       views.Handler
	Engine       bleve.Index
	IndexContent bool
	// contains filtered or unexported fields
}

func NewBleveEngine

func NewBleveEngine(indexContent bool) (*BleveServer, error)

func (*BleveServer) ClearIndex

func (s *BleveServer) ClearIndex(ctx context.Context) error

func (*BleveServer) Close

func (s *BleveServer) Close() error

func (*BleveServer) DeleteNode

func (s *BleveServer) DeleteNode(c context.Context, n *tree.Node) error

func (*BleveServer) IndexNode

func (s *BleveServer) IndexNode(c context.Context, n *tree.Node, reloadCore bool, excludes map[string]struct{}) error

func (*BleveServer) SearchNodes

func (s *BleveServer) SearchNodes(c context.Context, queryObject *tree.Query, from int32, size int32, resultChan chan *tree.Node, doneChan chan bool) error

Jump to

Keyboard shortcuts

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