Documentation
¶
Index ¶
- type DocPointerWithScore
- type SortedDocPointerWithScoreMerger
- type Term
- type Terms
- func (t *Terms) AdvanceAllAtLeast(minID uint64)
- func (t *Terms) CompletelyExhausted() bool
- func (t *Terms) FindFirstNonExhausted() (int, bool)
- func (t *Terms) FindMinID(minScore float64) (uint64, int, bool)
- func (t *Terms) FullSort()
- func (t *Terms) Len() int
- func (t *Terms) Less(i, j int) bool
- func (t *Terms) PartialSort()
- func (t *Terms) Pivot(minScore float64) bool
- func (t *Terms) ScoreNext(averagePropLength float64, config schema.BM25Config, ...) (uint64, float64, []*DocPointerWithScore)
- func (t *Terms) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocPointerWithScore ¶
type DocPointerWithScore struct { Id uint64 // A Frequency of 0 indicates a tombstone Frequency float32 PropLength float32 }
func (*DocPointerWithScore) FromBytes ¶
func (d *DocPointerWithScore) FromBytes(in []byte, isTombstone bool, boost float32) error
func (*DocPointerWithScore) FromKeyVal ¶
type SortedDocPointerWithScoreMerger ¶
type SortedDocPointerWithScoreMerger struct {
// contains filtered or unexported fields
}
func NewSortedDocPointerWithScoreMerger ¶
func NewSortedDocPointerWithScoreMerger() *SortedDocPointerWithScoreMerger
func (*SortedDocPointerWithScoreMerger) Do ¶
func (s *SortedDocPointerWithScoreMerger) Do(ctx context.Context, segments [][]DocPointerWithScore) ([]DocPointerWithScore, error)
type Term ¶
type Term struct { // doubles as max impact (with tf=1, the max impact would be 1*Idf), if there // is a boost for a queryTerm, simply apply it here once Idf float64 IdPointer uint64 PosPointer uint64 Data []DocPointerWithScore Exhausted bool QueryTerm string QueryTermIndex int }
func (*Term) AdvanceAtLeast ¶
func (*Term) ScoreAndAdvance ¶
func (t *Term) ScoreAndAdvance(averagePropLength float64, config schema.BM25Config) (uint64, float64, DocPointerWithScore)
type Terms ¶
func (*Terms) AdvanceAllAtLeast ¶
func (*Terms) CompletelyExhausted ¶
func (*Terms) FindFirstNonExhausted ¶
func (*Terms) PartialSort ¶
func (t *Terms) PartialSort()
func (*Terms) ScoreNext ¶
func (t *Terms) ScoreNext(averagePropLength float64, config schema.BM25Config, additionalExplanations bool) (uint64, float64, []*DocPointerWithScore)
Click to show internal directories.
Click to hide internal directories.