Documentation ¶
Index ¶
- type Indexer
- func (m *Indexer) Add(ctx domain.RequestContext, page page.Page, id string) (err error)
- func (m *Indexer) Delete(ctx domain.RequestContext, documentID, pageID string) (rows int64, err error)
- func (m *Indexer) DeleteDocument(ctx domain.RequestContext, documentID string) (err error)
- func (m *Indexer) Update(ctx domain.RequestContext, page page.Page) (err error)
- func (m *Indexer) UpdateDocument(ctx domain.RequestContext, document doc.Document) (err error)
- func (m *Indexer) UpdateLevel(ctx domain.RequestContext, documentID, pageID string, level int) (err error)
- func (m *Indexer) UpdateSequence(ctx domain.RequestContext, documentID, pageID string, sequence float64) (err error)
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 ¶
NewIndexer provides background search indexer
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) UpdateDocument ¶
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.