Versions in this module Expand all Collapse all v1 v1.0.0 Sep 29, 2016 Changes in this version + var Done = errors.New("search: query has no more results") + var ErrInvalidDocumentType = errors.New("search: invalid document type") + var ErrNoSuchDocument = errors.New("search: no such document") + func LoadStruct(dst interface{}, f []Field) error + type Atom string + type Cursor string + type DocumentMetadata struct + Facets []Facet + Rank int + type ErrFacetMismatch struct + FacetName string + Reason string + StructType reflect.Type + func (e *ErrFacetMismatch) Error() string + type ErrFieldMismatch struct + FieldName string + Reason string + func (e *ErrFieldMismatch) Error() string + type Facet struct + Name string + Value interface{} + type FacetResult struct + Count int + type FacetSearchOption interface + func AutoFacetDiscovery(facetLimit, valueLimit int) FacetSearchOption + func FacetDiscovery(name string, value ...interface{}) FacetSearchOption + func FacetDocumentDepth(depth int) FacetSearchOption + type Field struct + Derived bool + Language string + Name string + Value interface{} + func SaveStruct(src interface{}) ([]Field, error) + type FieldExpression struct + Expr string + Name string + type FieldList []Field + func (l *FieldList) Load(f []Field, _ *DocumentMetadata) error + func (l *FieldList) Save() ([]Field, *DocumentMetadata, error) + type FieldLoadSaver interface + Load func([]Field, *DocumentMetadata) error + Save func() ([]Field, *DocumentMetadata, error) + type HTML string + type Index struct + func Open(name string) (*Index, error) + func (x *Index) Delete(c context.Context, id string) error + func (x *Index) Get(c context.Context, id string, dst interface{}) error + func (x *Index) List(c context.Context, opts *ListOptions) *Iterator + func (x *Index) Put(c context.Context, id string, src interface{}) (string, error) + func (x *Index) Search(c context.Context, query string, opts *SearchOptions) *Iterator + type Iterator struct + func (t *Iterator) Count() int + func (t *Iterator) Cursor() Cursor + func (t *Iterator) Facets() ([][]FacetResult, error) + func (t *Iterator) Next(dst interface{}) (string, error) + type ListOptions struct + IDsOnly bool + Limit int + StartID string + type Range struct + End float64 + Start float64 + func AtLeast(min float64) Range + func LessThan(max float64) Range + type Scorer interface + var MatchScorer Scorer = enumScorer{ ... } + var RescoringMatchScorer Scorer = enumScorer{ ... } + type SearchOptions struct + CountAccuracy int + Cursor Cursor + Expressions []FieldExpression + Facets []FacetSearchOption + Fields []string + IDsOnly bool + Limit int + Offset int + Refinements []Facet + Sort *SortOptions + type SortExpression struct + Default interface{} + Expr string + Reverse bool + type SortOptions struct + Expressions []SortExpression + Limit int + Scorer Scorer