Documentation ¶
Index ¶
- type BooleanClause
- type BooleanNode
- type ChildDocIterator
- type ChildNode
- type ChildTermDocIterator
- func (t *ChildTermDocIterator) BlockMaxDocId() index.DocumentId
- func (t *ChildTermDocIterator) BlockUpperBound() float32
- func (t *ChildTermDocIterator) DocId() index.DocumentId
- func (t *ChildTermDocIterator) GlobalUpperBound() float32
- func (t *ChildTermDocIterator) IDF() float32
- func (t *ChildTermDocIterator) Next(docId index.DocumentId) bool
- func (t *ChildTermDocIterator) NextShallow(docId index.DocumentId) bool
- func (t *ChildTermDocIterator) Score(fieldLengthNorms *index.FieldLengthNorms) float32
- type ChildTermNode
- type Collector
- type ConjunctionRootNode
- type DisjunctionRootNode
- type DocScore
- type EmptyChildDocIterator
- func (e *EmptyChildDocIterator) DocId() index.DocumentId
- func (e *EmptyChildDocIterator) Next(docId index.DocumentId) bool
- func (e *EmptyChildDocIterator) NextShallow(docId index.DocumentId) bool
- func (e *EmptyChildDocIterator) Score(documentContext *index.FieldLengthNorms) float32
- func (e *EmptyChildDocIterator) UpperBound() float32
- type ExecutionContext
- type FieldStats
- type Heap
- type KeyValuePair
- type MatchType
- type Node
- type QueryContext
- type QueryField
- type RootConjunctionDocIterator
- type RootDisjunctionDocIterator
- type RootDocIterator
- type RootNode
- type RootTermDocIterator
- type RootTermNode
- type TermNode
- type TopNCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooleanClause ¶
type BooleanNode ¶
type BooleanNode struct {
Clauses []*BooleanClause
}
func (*BooleanNode) CreateChildNode ¶
func (n *BooleanNode) CreateChildNode(context *QueryContext) (ChildNode, error)
func (*BooleanNode) CreateRootNode ¶
func (n *BooleanNode) CreateRootNode(context *QueryContext) (RootNode, error)
type ChildDocIterator ¶
type ChildDocIterator interface { BlockMaxDocId() index.DocumentId BlockUpperBound() float32 DocId() index.DocumentId GlobalUpperBound() float32 IDF() float32 Next(docId index.DocumentId) bool NextShallow(docId index.DocumentId) bool Score(documentContext *index.FieldLengthNorms) float32 }
type ChildNode ¶
type ChildNode interface {
CreateChildDocIterator(context *ExecutionContext, segmentIndex int) ChildDocIterator
}
type ChildTermDocIterator ¶
type ChildTermDocIterator struct {
// contains filtered or unexported fields
}
func (*ChildTermDocIterator) BlockMaxDocId ¶
func (t *ChildTermDocIterator) BlockMaxDocId() index.DocumentId
func (*ChildTermDocIterator) BlockUpperBound ¶
func (t *ChildTermDocIterator) BlockUpperBound() float32
func (*ChildTermDocIterator) DocId ¶
func (t *ChildTermDocIterator) DocId() index.DocumentId
func (*ChildTermDocIterator) GlobalUpperBound ¶
func (t *ChildTermDocIterator) GlobalUpperBound() float32
func (*ChildTermDocIterator) IDF ¶
func (t *ChildTermDocIterator) IDF() float32
func (*ChildTermDocIterator) Next ¶
func (t *ChildTermDocIterator) Next(docId index.DocumentId) bool
func (*ChildTermDocIterator) NextShallow ¶
func (t *ChildTermDocIterator) NextShallow(docId index.DocumentId) bool
func (*ChildTermDocIterator) Score ¶
func (t *ChildTermDocIterator) Score(fieldLengthNorms *index.FieldLengthNorms) float32
type ChildTermNode ¶
type ChildTermNode struct {
// contains filtered or unexported fields
}
func (*ChildTermNode) CreateChildDocIterator ¶
func (t *ChildTermNode) CreateChildDocIterator(context *ExecutionContext, segmentIndex int) ChildDocIterator
type ConjunctionRootNode ¶
type ConjunctionRootNode struct {
// contains filtered or unexported fields
}
func (*ConjunctionRootNode) CreateRootDocIterator ¶
func (d *ConjunctionRootNode) CreateRootDocIterator(context *ExecutionContext, segmentIndex int) RootDocIterator
type DisjunctionRootNode ¶
type DisjunctionRootNode struct {
// contains filtered or unexported fields
}
func (*DisjunctionRootNode) CreateRootDocIterator ¶
func (d *DisjunctionRootNode) CreateRootDocIterator(context *ExecutionContext, segmentIndex int) RootDocIterator
type EmptyChildDocIterator ¶
type EmptyChildDocIterator struct { }
func (*EmptyChildDocIterator) DocId ¶
func (e *EmptyChildDocIterator) DocId() index.DocumentId
func (*EmptyChildDocIterator) Next ¶
func (e *EmptyChildDocIterator) Next(docId index.DocumentId) bool
func (*EmptyChildDocIterator) NextShallow ¶
func (e *EmptyChildDocIterator) NextShallow(docId index.DocumentId) bool
func (*EmptyChildDocIterator) Score ¶
func (e *EmptyChildDocIterator) Score(documentContext *index.FieldLengthNorms) float32
func (*EmptyChildDocIterator) UpperBound ¶
func (e *EmptyChildDocIterator) UpperBound() float32
type ExecutionContext ¶
type ExecutionContext struct { // FieldLengthReaders[segmentIndex][fieldIndex] FieldLengthReaders [][]*index.FieldLengthReader //PrecomputedFieldNorms[fieldIndex][lengthId] PrecomputedFieldNorms [][]float32 // contains filtered or unexported fields }
func GenerateExecutionContext ¶
func GenerateExecutionContext(queryContext *QueryContext, segmentReaders []*index.SegmentReader) (*ExecutionContext, error)
type FieldStats ¶
type FieldStats struct {
// contains filtered or unexported fields
}
type Heap ¶
type Heap struct {
// contains filtered or unexported fields
}
func NewMaxHeap ¶
func NewMaxHeap() *Heap
func NewMinHeap ¶
func NewMinHeap() *Heap
type KeyValuePair ¶
type KeyValuePair struct { Key float32 Value interface{} }
type Node ¶
type Node interface { CreateRootNode(context *QueryContext) (RootNode, error) CreateChildNode(context *QueryContext) (ChildNode, error) }
type QueryContext ¶
type QueryContext struct {
Fields []*QueryField
}
func (*QueryContext) RegisterTerm ¶
func (c *QueryContext) RegisterTerm(fieldName string, term []byte) (int, int)
type QueryField ¶
type QueryField struct {
// contains filtered or unexported fields
}
type RootConjunctionDocIterator ¶
type RootConjunctionDocIterator struct {
// contains filtered or unexported fields
}
func NewConjunctionDocIterator ¶
func NewConjunctionDocIterator(childIterators []ChildDocIterator) *RootConjunctionDocIterator
func (*RootConjunctionDocIterator) Next ¶
func (d *RootConjunctionDocIterator) Next(fieldLengthNorms *index.FieldLengthNorms, lowerBound float32) (index.DocumentId, float32, bool)
type RootDisjunctionDocIterator ¶
type RootDisjunctionDocIterator struct {
// contains filtered or unexported fields
}
func NewDisjunctionDocIterator ¶
func NewDisjunctionDocIterator(childIterators []ChildDocIterator) *RootDisjunctionDocIterator
func (*RootDisjunctionDocIterator) Next ¶
func (d *RootDisjunctionDocIterator) Next(documentContext *index.FieldLengthNorms, lowerBound float32) (index.DocumentId, float32, bool)
Implements block-max WAND Reference: Shuai Ding and Torsten Suel. 2011. Faster top-k document retrieval using block-max indexes. In Proceedings of the 34th international ACM SIGIR conference on Research and development in Information Retrieval (SIGIR '11). Association for Computing Machinery, New York, NY, USA, 993–1002.
type RootDocIterator ¶
type RootDocIterator interface {
Next(documentContext *index.FieldLengthNorms, lowerBound float32) (index.DocumentId, float32, bool)
}
type RootNode ¶
type RootNode interface {
CreateRootDocIterator(context *ExecutionContext, segmentIndex int) RootDocIterator
}
type RootTermDocIterator ¶
type RootTermDocIterator struct {
// contains filtered or unexported fields
}
func (*RootTermDocIterator) Next ¶
func (t *RootTermDocIterator) Next(fieldLengthNorms *index.FieldLengthNorms, lowerBound float32) (index.DocumentId, float32, bool)
type RootTermNode ¶
type RootTermNode struct {
// contains filtered or unexported fields
}
func (*RootTermNode) CreateRootDocIterator ¶
func (t *RootTermNode) CreateRootDocIterator(context *ExecutionContext, segmentIndex int) RootDocIterator
type TermNode ¶
func (*TermNode) CreateChildNode ¶
func (t *TermNode) CreateChildNode(context *QueryContext) (ChildNode, error)
func (*TermNode) CreateRootNode ¶
func (t *TermNode) CreateRootNode(context *QueryContext) (RootNode, error)
type TopNCollector ¶
type TopNCollector struct {
// contains filtered or unexported fields
}
func NewTopNCollector ¶
func NewTopNCollector(topN int) *TopNCollector
func (*TopNCollector) Collect ¶
func (c *TopNCollector) Collect(docId uint64, score float32)
func (*TopNCollector) Get ¶
func (c *TopNCollector) Get() []*DocScore
func (*TopNCollector) LowerBound ¶
func (c *TopNCollector) LowerBound() float32
Click to show internal directories.
Click to hide internal directories.