7 #ifndef DISJUNCTIONMAXSCORER_H 8 #define DISJUNCTIONMAXSCORER_H 37 virtual int32_t
docID();
41 virtual double score();
43 virtual int32_t
advance(int32_t target);
virtual int32_t docID()
Returns the following:
SimilarityPtr similarity
Definition: Scorer.h:29
int32_t doc
Definition: DisjunctionMaxScorer.h:33
DisjunctionMaxScorer(double tieBreakerMultiplier, const SimilarityPtr &similarity, Collection< ScorerPtr > subScorers, int32_t numScorers)
virtual int32_t advance(int32_t target)
Advances to the first beyond the current whose document number is greater than or equal to target...
void scoreAll(int32_t root, int32_t size, int32_t doc, Collection< double > sum, Collection< double > max)
Recursively iterate all subScorers that generated last doc computing sum and max. ...
Common scoring functionality for different types of queries.
Definition: Scorer.h:22
int32_t numScorers
Definition: DisjunctionMaxScorer.h:28
Collection< ScorerPtr > subScorers
The scorers for subqueries that have remaining docs, kept as a min heap by number of next doc...
Definition: DisjunctionMaxScorer.h:23
virtual ~DisjunctionMaxScorer()
virtual double score()
Determine the current document score. Initially invalid, until next() is called the first time...
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
void heapify()
Organize subScorers into a min heap with scorers generating the earliest document on top...
double tieBreakerMultiplier
Multiplier applied to non-maximum-scoring subqueries for a document as they are summed into the resul...
Definition: DisjunctionMaxScorer.h:31
The Scorer for DisjunctionMaxQuery. The union of all documents generated by the the subquery scorers ...
Definition: DisjunctionMaxScorer.h:18
void heapAdjust(int32_t root)
The subtree of subScorers at root is a min heap except possibly for its root element. Bubble the root down as required to make the subtree a heap.
boost::shared_ptr< Similarity > SimilarityPtr
Definition: LuceneTypes.h:435
void heapRemoveRoot()
Remove the root Scorer from subScorers and re-establish it as a heap.
virtual int32_t nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if t...