7 #ifndef DISJUNCTIONSUMSCORER_H
8 #define DISJUNCTIONSUMSCORER_H
58 virtual double score();
60 virtual int32_t
docID();
71 virtual int32_t
advance(int32_t target);
82 virtual bool score(
const CollectorPtr& collector, int32_t max, int32_t firstDocID);
double currentScore
Definition: DisjunctionSumScorer.h:48
void initScorerDocQueue()
Called the first time next() or skipTo() is called to initialize scorerDocQueue.
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 currentDoc
The document number of the current match.
Definition: DisjunctionSumScorer.h:43
ScorerDocQueuePtr scorerDocQueue
The scorerDocQueue contains all subscorers ordered by their current doc(), with the minimum at the to...
Definition: DisjunctionSumScorer.h:40
virtual int32_t docID()
Returns the following:
boost::shared_ptr< ScorerDocQueue > ScorerDocQueuePtr
Definition: LuceneTypes.h:549
virtual ~DisjunctionSumScorer()
virtual double score()
Returns the score of the current document matching the query. Initially invalid, until next() is call...
int32_t minimumNrMatchers
The minimum number of scorers that should match.
Definition: DisjunctionSumScorer.h:31
int32_t nrScorers
The number of subscorers.
Definition: DisjunctionSumScorer.h:21
int32_t _nrMatchers
The number of subscorers that provide the current match.
Definition: DisjunctionSumScorer.h:46
Common scoring functionality for different types of queries.
Definition: Scorer.h:22
boost::shared_ptr< Collector > CollectorPtr
Definition: LuceneTypes.h:295
bool advanceAfterCurrent()
Advance all subscorers after the current document determined by the top of the scorerDocQueue. Repeat until at least the minimum number of subscorers match on the same document and all subscorers are after that document or are exhausted. On entry the scorerDocQueue has at least minimumNrMatchers available. At least the scorer with the minimum document number will be advanced.
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
virtual int32_t advance(int32_t target)
Advances to the first match beyond the current whose document number is greater than or equal to a gi...
Definition: AbstractAllTermDocs.h:12
A Scorer for OR like queries, counterpart of ConjunctionScorer. This Scorer implements Scorer#skipTo(...
Definition: DisjunctionSumScorer.h:16
Collection< ScorerPtr > subScorers
The subscorers.
Definition: DisjunctionSumScorer.h:28
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
int32_t nrMatchers()
Returns the number of subscorers matching the current document. Initially invalid, until next() is called the first time.
DisjunctionSumScorer(Collection< ScorerPtr > subScorers, int32_t minimumNrMatchers=1)