bleve

package
v2.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 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

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

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

func NewBatch

func NewBatch(options BatchOptions) *Batch

func (*Batch) Delete

func (b *Batch) Delete(uuid string)

func (*Batch) Flush

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

func (*Batch) Index

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

func (*Batch) LoadIndexableNode

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

func (*Batch) NamespacesProvider

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

func (*Batch) Size

func (b *Batch) Size() int

type BatchOptions

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

type IndexableNode

type IndexableNode struct {
	tree.Node

	ModifTime   time.Time
	Basename    string
	NodeType    string
	Extension   string
	TextContent string
	GeoPoint    map[string]interface{}
	Meta        map[string]interface{}
	// contains filtered or unexported fields
}

func (*IndexableNode) BleveType

func (i *IndexableNode) BleveType() string

Jump to

Keyboard shortcuts

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