search

package
v1.51.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

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

Indexer type provides the datastructure for the queues of activity to be serialized through a single background goroutine. NOTE if the queue becomes full, the system will trigger the rebuilding entire files in order to clear the backlog.

func NewIndexer

func NewIndexer(rt *env.Runtime, s *domain.Store) (i Indexer)

NewIndexer provides background search indexer

func (*Indexer) Add

func (m *Indexer) Add(ctx domain.RequestContext, page page.Page, id string) (err error)

Add should be called when a new page is added to a document.

func (*Indexer) Delete

func (m *Indexer) Delete(ctx domain.RequestContext, documentID, pageID string) (rows int64, err error)

Delete should be called after a page has been deleted.

func (*Indexer) DeleteDocument

func (m *Indexer) DeleteDocument(ctx domain.RequestContext, documentID string) (err error)

DeleteDocument should be called after a document record has been deleted.

func (*Indexer) Update

func (m *Indexer) Update(ctx domain.RequestContext, page page.Page) (err error)

Update should be called after a page record has been updated.

func (*Indexer) UpdateDocument

func (m *Indexer) UpdateDocument(ctx domain.RequestContext, document doc.Document) (err error)

UpdateDocument should be called after a document record has been updated.

func (*Indexer) UpdateLevel

func (m *Indexer) UpdateLevel(ctx domain.RequestContext, documentID, pageID string, level int) (err error)

UpdateLevel should be called after the level of a page has been changed.

func (*Indexer) UpdateSequence

func (m *Indexer) UpdateSequence(ctx domain.RequestContext, documentID, pageID string, sequence float64) (err error)

UpdateSequence should be called after a page record has been resequenced.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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