Documentation ¶
Index ¶
- func RegisterSearchPageType(pgtype string)
- func SearchDocument(p *page.Page) (doc search.Document, err error)
- func SearchMapping(p *page.Page) (doctype string, dm *mapping.DocumentMapping, err error)
- type ArrayPositions
- type DocumentMatch
- type DocumentMatchCollection
- type Explanation
- type FacetResult
- type FacetResults
- type FieldFragmentMap
- type FieldTermLocation
- type FieldTermLocationMap
- type HighlightRequest
- type IndexErrMap
- type Location
- type Locations
- type SearchRequest
- type SearchResult
- type SearchStatus
- type TermLocationMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSearchPageType ¶
func RegisterSearchPageType(pgtype string)
func SearchMapping ¶
Types ¶
type ArrayPositions ¶
type ArrayPositions []uint64
type DocumentMatch ¶
type DocumentMatch struct { Index string `json:"index,omitempty"` ID string `json:"id"` // IndexInternalID index.IndexInternalID `json:"-"` Score float64 `json:"score"` Expl *Explanation `json:"explanation,omitempty"` Locations FieldTermLocationMap `json:"locations,omitempty"` Fragments FieldFragmentMap `json:"fragments,omitempty"` Sort []string `json:"sort,omitempty"` Fields map[string]interface{} `json:"fields,omitempty"` HitNumber uint64 `json:"-"` FieldTermLocations []FieldTermLocation `json:"-"` }
type DocumentMatchCollection ¶
type DocumentMatchCollection []*DocumentMatch
type Explanation ¶
type Explanation struct { Value float64 `json:"value"` Message string `json:"message"` Children []*Explanation `json:"children,omitempty"` }
type FacetResult ¶
type FacetResults ¶
type FacetResults map[string]*FacetResult
type FieldFragmentMap ¶
type FieldTermLocation ¶
type FieldTermLocationMap ¶
type FieldTermLocationMap map[string]TermLocationMap
type HighlightRequest ¶
type IndexErrMap ¶
type Location ¶
type Location struct { Pos uint64 `json:"pos"` Start uint64 `json:"start"` End uint64 `json:"end"` ArrayPositions ArrayPositions `json:"array_positions"` }
type SearchRequest ¶
type SearchRequest struct { // Query query.Query `json:"query"` Size int `json:"size"` From int `json:"from"` Highlight *HighlightRequest `json:"highlight"` Fields []string `json:"fields"` // Facets FacetsRequest `json:"facets"` Explain bool `json:"explain"` // Sort search.SortOrder `json:"sort"` IncludeLocations bool `json:"includeLocations"` Score string `json:"score,omitempty"` SearchAfter []string `json:"search_after"` SearchBefore []string `json:"search_before"` // contains filtered or unexported fields }
type SearchResult ¶
type SearchResult struct { Status *SearchStatus `json:"status"` Request *SearchRequest `json:"request"` Hits DocumentMatchCollection `json:"hits"` Total uint64 `json:"total_hits"` BytesRead uint64 `json:"bytesRead,omitempty"` MaxScore float64 `json:"max_score"` Took time.Duration `json:"took"` Facets FacetResults `json:"facets"` }
type SearchStatus ¶
type SearchStatus struct { Total int `json:"total"` Failed int `json:"failed"` Successful int `json:"successful"` Errors IndexErrMap `json:"errors,omitempty"` }
type TermLocationMap ¶
Click to show internal directories.
Click to hide internal directories.