7#ifndef DISJUNCTIONMAXSCORER_H
8#define DISJUNCTIONMAXSCORER_H
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
The Scorer for DisjunctionMaxQuery. The union of all documents generated by the the subquery scorers ...
Definition DisjunctionMaxScorer.h:18
double tieBreakerMultiplier
Multiplier applied to non-maximum-scoring subqueries for a document as they are summed into the resul...
Definition DisjunctionMaxScorer.h:31
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.
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...
int32_t numScorers
Definition DisjunctionMaxScorer.h:28
virtual double score()
Determine the current document score. Initially invalid, until next() is called the first time.
virtual int32_t advance(int32_t target)
Advances to the first beyond the current whose document number is greater than or equal to target....
virtual ~DisjunctionMaxScorer()
virtual int32_t docID()
Returns the following:
Collection< ScorerPtr > subScorers
The scorers for subqueries that have remaining docs, kept as a min heap by number of next doc.
Definition DisjunctionMaxScorer.h:27
void heapRemoveRoot()
Remove the root Scorer from subScorers and re-establish it as a heap.
DisjunctionMaxScorer(double tieBreakerMultiplier, const SimilarityPtr &similarity, Collection< ScorerPtr > subScorers, int32_t numScorers)
int32_t doc
Definition DisjunctionMaxScorer.h:33
void heapify()
Organize subScorers into a min heap with scorers generating the earliest document on top.
void heapAdjust(int32_t root)
The subtree of subScorers at root is a min heap except possibly for its root element....
Common scoring functionality for different types of queries.
Definition Scorer.h:33
SimilarityPtr similarity
Definition Scorer.h:45
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< Similarity > SimilarityPtr
Definition LuceneTypes.h:435