Documentation ¶
Index ¶
Constants ¶
View Source
const ( This = 1 That = -1 Equal = 0 )
Comparison outputs
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FacetAttrs ¶
type FacetAttrs struct {
// contains filtered or unexported fields
}
type FacetCount ¶
type Hit ¶
func NewSearchHit ¶
func NewSearchHit(tsHit *tsApi.SearchResultHit) *Hit
type SortedFacets ¶
type SortedFacets struct {
// contains filtered or unexported fields
}
SortedFacets is a Temporary workaround to merge facet values when aggregating results from multi-search queries resulting from OR filters this is not very efficient as of now
func NewSortedFacets ¶
func NewSortedFacets() *SortedFacets
func (*SortedFacets) Add ¶
func (f *SortedFacets) Add(tsCounts *tsApi.FacetCounts) error
Add creates or merges the facet counts with existing for each field new values cannot be added to this data structure once it has been sorted
func (*SortedFacets) GetFacetCount ¶
func (f *SortedFacets) GetFacetCount(field string) (*FacetCount, bool)
GetFacetCount removes from priority queue and returns the value with highest count for the field if present else returns nil, False
func (*SortedFacets) GetStats ¶
func (f *SortedFacets) GetStats(field string) *api.FacetStats
GetStats returns the computed stats for the faceted field
type SortedHits ¶
type SortedHits struct {
// contains filtered or unexported fields
}
SortedHits is a Priority queue to hold sorted search hits
func NewSortedHits ¶
func NewSortedHits(sortingOrder *sort.Ordering) SortedHits
NewSortedHits returns hits in decreasing order by priority
func (*SortedHits) Add ¶
func (s *SortedHits) Add(hit *Hit)
func (*SortedHits) Get ¶
func (s *SortedHits) Get() (*Hit, error)
func (*SortedHits) HasMoreHits ¶
func (s *SortedHits) HasMoreHits() bool
func (*SortedHits) Len ¶
func (s *SortedHits) Len() int
Click to show internal directories.
Click to hide internal directories.