Documentation ¶
Index ¶
- type Collector
- type DateRangeFacet
- type DocumentMatch
- type DocumentMatchCollection
- type Explanation
- type FacetBuilder
- type FacetResult
- type FacetResults
- type FacetsBuilder
- type FieldFragmentMap
- type FieldTermLocationMap
- type Location
- type Locations
- type NumericRangeFacet
- type Searcher
- type TermFacet
- type TermLocationMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { Collect(searcher Searcher) error Results() DocumentMatchCollection Total() uint64 MaxScore() float64 Took() time.Duration SetFacetsBuilder(facetsBuilder *FacetsBuilder) FacetResults() FacetResults }
type DateRangeFacet ¶
type DocumentMatch ¶
type DocumentMatch struct { ID string `json:"id"` Score float64 `json:"score"` Expl *Explanation `json:"explanation,omitempty"` Locations FieldTermLocationMap `json:"locations,omitempty"` Fragments FieldFragmentMap `json:"fragments,omitempty"` Fields map[string]interface{} `json:"fields,omitempty"` }
func (*DocumentMatch) AddFieldValue ¶
func (dm *DocumentMatch) AddFieldValue(name string, value interface{})
type DocumentMatchCollection ¶
type DocumentMatchCollection []*DocumentMatch
type Explanation ¶
type Explanation struct { Value float64 `json:"value"` Message string `json:"message"` Children []*Explanation `json:"children,omitempty"` }
func (*Explanation) String ¶
func (expl *Explanation) String() string
type FacetBuilder ¶
type FacetBuilder interface { Update(index.FieldTerms) Result() FacetResult }
type FacetResult ¶
type FacetResult struct { Field string `json:"field"` Total int `json:"total"` Missing int `json:"missing"` Other int `json:"other"` Terms []*TermFacet `json:"terms,omitempty"` NumericRanges []*NumericRangeFacet `json:"numeric_ranges,omitempty"` DateRanges []*DateRangeFacet `json:"date_ranges,omitempty"` }
type FacetResults ¶
type FacetResults map[string]FacetResult
type FacetsBuilder ¶
type FacetsBuilder struct {
// contains filtered or unexported fields
}
func NewFacetsBuilder ¶
func NewFacetsBuilder(indexReader index.IndexReader) *FacetsBuilder
func (*FacetsBuilder) Add ¶
func (fb *FacetsBuilder) Add(name string, facetBuilder FacetBuilder)
func (*FacetsBuilder) Results ¶
func (fb *FacetsBuilder) Results() FacetResults
func (*FacetsBuilder) Update ¶
func (fb *FacetsBuilder) Update(docMatch *DocumentMatch) error
type FieldFragmentMap ¶
type FieldTermLocationMap ¶
type FieldTermLocationMap map[string]TermLocationMap
func MergeLocations ¶
func MergeLocations(locations []FieldTermLocationMap) FieldTermLocationMap
type NumericRangeFacet ¶
type Searcher ¶
type Searcher interface { Next() (*DocumentMatch, error) Advance(ID string) (*DocumentMatch, error) Close() Weight() float64 SetQueryNorm(float64) Count() uint64 Min() int }
type TermLocationMap ¶
func MergeTermLocationMaps ¶
func MergeTermLocationMaps(rv, other TermLocationMap) TermLocationMap
func (TermLocationMap) AddLocation ¶
func (t TermLocationMap) AddLocation(term string, location *Location)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.