Documentation
¶
Index ¶
- func BuildBleveMapping() (mapping.IndexMapping, error)
- func NewBleveIndex(root string) (bleve.Index, error)
- type Bleve
- func (b *Bleve) Delete(id string) error
- func (b *Bleve) DocCount() (uint64, error)
- func (b *Bleve) Move(id string, parentid string, target string) error
- func (b *Bleve) Purge(id string) error
- func (b *Bleve) Restore(id string) error
- func (b *Bleve) Search(ctx context.Context, sir *searchService.SearchIndexRequest) (*searchService.SearchIndexResponse, error)
- func (b *Bleve) Upsert(id string, r Resource) error
- type Engine
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBleveMapping ¶
func BuildBleveMapping() (mapping.IndexMapping, error)
BuildBleveMapping builds a bleve index mapping which can be used for indexing
Types ¶
type Bleve ¶
type Bleve struct {
// contains filtered or unexported fields
}
Bleve represents a search engine which utilizes bleve to search and store resources.
func NewBleveEngine ¶
NewBleveEngine creates a new Bleve instance
func (*Bleve) Delete ¶
Delete marks the resource as deleted. The resource object will stay in the bleve index, instead of removing the resource it just marks it as deleted! can be undone
func (*Bleve) Restore ¶
Restore is the counterpart to Delete. It restores the resource which makes it available again.
func (*Bleve) Search ¶
func (b *Bleve) Search(ctx context.Context, sir *searchService.SearchIndexRequest) (*searchService.SearchIndexResponse, error)
Search executes a search request operation within the index. Returns a SearchIndexResponse object or an error.
type Engine ¶
type Engine interface {
Search(ctx context.Context, req *searchService.SearchIndexRequest) (*searchService.SearchIndexResponse, error)
Upsert(id string, r Resource) error
Move(id string, parentid string, target string) error
Delete(id string) error
Restore(id string) error
Purge(id string) error
DocCount() (uint64, error)
}
Engine is the interface to the search engine
Click to show internal directories.
Click to hide internal directories.