Documentation
¶
Index ¶
- Variables
- func DecodeBlockDataReusable(data []byte, out *BlockData)
- func DoBlockMaxWand(limit int, results *Terms, averagePropLength float64, ...) *priorityqueue.Queue[[]*DocPointerWithScore]
- func DoWand(limit int, results *Terms, averagePropLength float64, ...) *priorityqueue.Queue[[]*DocPointerWithScore]
- type BlockData
- type BlockDataDecoded
- type BlockEntry
- type DocPointerWithScore
- type SortedDocPointerWithScoreMerger
- type Term
- func (t *Term) Advance()
- func (t *Term) AdvanceAtLeast(minID uint64)
- func (t *Term) AdvanceAtLeastShallow(minID uint64)
- func (t *Term) Count() int
- func (t *Term) CurrentBlockImpact() float32
- func (t *Term) CurrentBlockMaxId() uint64
- func (t *Term) Exhausted() bool
- func (t *Term) IdPointer() uint64
- func (t *Term) Idf() float64
- func (t *Term) PosPointer() uint64
- func (t *Term) QueryTerm() string
- func (t *Term) QueryTermIndex() int
- func (t *Term) Score(averagePropLength float64, additionalExplanations bool) (uint64, float64, *DocPointerWithScore)
- func (t *Term) SetIdPointer(idPointer uint64)
- func (t *Term) SetIdf(idf float64)
- func (t *Term) SetPosPointer(posPointer uint64)
- type TermInterface
- type Terms
- func (t *Terms) AdvanceAllAtLeast(minID uint64, pivot int)
- func (t *Terms) CompletelyExhausted() bool
- func (t *Terms) FindFirstNonExhausted() (int, bool)
- func (t *Terms) FindMinID(minScore float64) (uint64, int, bool)
- func (t *Terms) FindMinIDWand(minScore float64) (uint64, int, bool)
- func (t *Terms) GetBlockUpperBound(pivot int, pivotId uint64) float32
- func (t *Terms) Len() int
- func (t *Terms) Less(i, j int) bool
- func (t *Terms) Pivot(minScore float64) bool
- func (t *Terms) ScoreNext(averagePropLength float64, additionalExplanations bool) (uint64, float64, []*DocPointerWithScore)
- func (t *Terms) SortFirst()
- func (t *Terms) SortFull()
- func (t *Terms) SortPartial(nextList int)
- func (t *Terms) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BLOCK_SIZE = 128 // if we are only encoding few documents, we can encode the doc ids and tfs as full bytes. // Limit for this is currently set to 1 ENCODE_AS_FULL_BYTES = 1 )
Functions ¶
func DecodeBlockDataReusable ¶ added in v1.28.0
func DoBlockMaxWand ¶ added in v1.28.0
func DoBlockMaxWand(limit int, results *Terms, averagePropLength float64, additionalExplanations bool, ) *priorityqueue.Queue[[]*DocPointerWithScore]
func DoWand ¶ added in v1.28.0
func DoWand(limit int, results *Terms, averagePropLength float64, additionalExplanations bool, ) *priorityqueue.Queue[[]*DocPointerWithScore]
Types ¶
type BlockData ¶ added in v1.28.0
func DecodeBlockData ¶ added in v1.28.0
type BlockDataDecoded ¶ added in v1.28.0
type BlockEntry ¶ added in v1.28.0
func DecodeBlockEntry ¶ added in v1.28.0
func DecodeBlockEntry(data []byte) *BlockEntry
func (*BlockEntry) Encode ¶ added in v1.28.0
func (b *BlockEntry) Encode() []byte
func (*BlockEntry) Size ¶ added in v1.28.0
func (b *BlockEntry) Size() int
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) FromBytesInverted ¶ added in v1.28.0
func (d *DocPointerWithScore) FromBytesInverted(in []byte, boost float32, propLen 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 { Data []DocPointerWithScore // contains filtered or unexported fields }
func (*Term) AdvanceAtLeast ¶
func (*Term) AdvanceAtLeastShallow ¶ added in v1.28.0
func (*Term) CurrentBlockImpact ¶ added in v1.28.0
func (*Term) CurrentBlockMaxId ¶ added in v1.28.0
func (*Term) PosPointer ¶
func (*Term) QueryTermIndex ¶
func (*Term) SetIdPointer ¶ added in v1.28.0
func (*Term) SetPosPointer ¶ added in v1.28.0
type TermInterface ¶ added in v1.28.0
type TermInterface interface { // 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 Exhausted() bool Count() int QueryTermIndex() int AdvanceAtLeast(minID uint64) AdvanceAtLeastShallow(minID uint64) Advance() Score(averagePropLength float64, additionalExplanations bool) (uint64, float64, *DocPointerWithScore) CurrentBlockImpact() float32 CurrentBlockMaxId() uint64 }
type Terms ¶
type Terms struct { T []TermInterface Count int }
func (*Terms) AdvanceAllAtLeast ¶
func (*Terms) CompletelyExhausted ¶
func (*Terms) FindFirstNonExhausted ¶
func (*Terms) FindMinIDWand ¶ added in v1.28.0
func (*Terms) GetBlockUpperBound ¶ added in v1.28.0
func (*Terms) SortPartial ¶ added in v1.28.0
Click to show internal directories.
Click to hide internal directories.