Back to

Package bleve

Latest Go to latest

The latest major version is .

Published: Jul 9, 2019 | License: AGPL-3.0 | Module:


Package bleve implements the search engine using a Bleve indexer.



var (
	BleveIndexPath = ""
	BatchSize      = 2000

type Batch

type Batch struct {
	// 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 {

	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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier