A Scorer for queries with a required part and an optional part. Delays skipTo() on the optional part until a score() is needed. This Scorer implements Scorer#skipTo(int32_t).
More...
#include <ReqOptSumScorer.h>
A Scorer for queries with a required part and an optional part. Delays skipTo() on the optional part until a score() is needed. This Scorer implements Scorer#skipTo(int32_t).
◆ ReqOptSumScorer()
Lucene::ReqOptSumScorer::ReqOptSumScorer |
( |
const ScorerPtr & |
reqScorer, |
|
|
const ScorerPtr & |
optScorer |
|
) |
| |
◆ ~ReqOptSumScorer()
virtual Lucene::ReqOptSumScorer::~ReqOptSumScorer |
( |
| ) |
|
|
virtual |
◆ _getClassName()
static String Lucene::ReqOptSumScorer::_getClassName |
( |
| ) |
|
|
inlinestatic |
◆ advance()
virtual int32_t Lucene::ReqOptSumScorer::advance |
( |
int32_t |
target | ) |
|
|
virtual |
Advances to the first beyond the current whose document number is greater than or equal to target. Returns the current document number or NO_MORE_DOCS if there are no more docs in the set.
Behaves as if written:
int32_t advance(int32_t target)
{
int32_t doc;
while ((doc = nextDoc()) < target)
{ }
return doc;
}
Some implementations are considerably more efficient than that.
NOTE: certain implementations may return a different value (each time) if called several times in a row with the same target.
NOTE: this method may be called with { NO_MORE_DOCS} for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behaviour.
Implements Lucene::DocIdSetIterator.
◆ docID()
virtual int32_t Lucene::ReqOptSumScorer::docID |
( |
| ) |
|
|
virtual |
◆ getClassName()
virtual String Lucene::ReqOptSumScorer::getClassName |
( |
| ) |
|
|
inlinevirtual |
◆ nextDoc()
virtual int32_t Lucene::ReqOptSumScorer::nextDoc |
( |
| ) |
|
|
virtual |
Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behaviour.
Implements Lucene::DocIdSetIterator.
◆ score()
virtual double Lucene::ReqOptSumScorer::score |
( |
| ) |
|
|
virtual |
Returns the score of the current document matching the query. Initially invalid, until next() is called the first time.
- Returns
- The score of the required scorer, eventually increased by the score of the optional scorer when it also matches the current document.
Implements Lucene::Scorer.
◆ shared_from_this()
boost::shared_ptr< ReqOptSumScorer > Lucene::ReqOptSumScorer::shared_from_this |
( |
| ) |
|
|
inline |
◆ optScorer
◆ reqScorer
The documentation for this class was generated from the following file: