Documentation ¶
Index ¶
- Variables
- type Index
- func (i *Index) Close() error
- func (i *Index) Delete(id string) (err error)
- func (i *Index) DocCount() (count uint64, err error)
- func (i *Index) Index(doc *document.Document) (err error)
- func (i *Index) Search(qry query.Query, col search.Collector) (sr *bleve.SearchResult, err error)
- func (i *Index) SearchInContext(ctx context.Context, qry query.Query, collector search.Collector) (sr *bleve.SearchResult, err error)
- type Presearcher
- type TermPresearcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorEmptyID = errors.New("document ID cannot be empty") ErrorIndexClosed = errors.New("index is closed") )
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is a stripped down version on bleve.Index
func NewIndex ¶
func NewIndex(mapping mapping.IndexMapping) (*Index, error)
NewIndex creates a memory-only index.
type Presearcher ¶
type TermPresearcher ¶
type TermPresearcher struct { }
func (*TermPresearcher) BuildQuery ¶
func (p *TermPresearcher) BuildQuery(doc map[string]interface{}) query.Query
BuildQuery builds a query.Query from a document.
func (*TermPresearcher) IndexQuery ¶
IndexQuery creates a document.Document from a query.Query.
Click to show internal directories.
Click to hide internal directories.