A Scorer for queries with a required subscorer and an excluding (prohibited) sub DocIdSetIterator. This Scorer implements Scorer#skipTo(int32_t)
, and it uses the skipTo() on the given scorers.
More...
#include <ReqExclScorer.h>
|
int32_t | toNonExcluded () |
| Advance to non excluded doc.
|
|
virtual bool | score (const CollectorPtr &collector, int32_t max, int32_t firstDocID) |
| Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that nextDoc() was called before this method.
|
|
| LuceneObject () |
|
A Scorer for queries with a required subscorer and an excluding (prohibited) sub DocIdSetIterator. This Scorer implements Scorer#skipTo(int32_t)
, and it uses the skipTo() on the given scorers.
◆ ReqExclScorer()
Construct a ReqExclScorer.
- Parameters
-
reqScorer | The scorer that must match, except where |
exclDisi | indicates exclusion. |
◆ ~ReqExclScorer()
virtual Lucene::ReqExclScorer::~ReqExclScorer |
( |
| ) |
|
|
virtual |
◆ _getClassName()
static String Lucene::ReqExclScorer::_getClassName |
( |
| ) |
|
|
inlinestatic |
◆ advance()
virtual int32_t Lucene::ReqExclScorer::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 {@value 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::ReqExclScorer::docID |
( |
| ) |
|
|
virtual |
◆ getClassName()
virtual String Lucene::ReqExclScorer::getClassName |
( |
| ) |
|
|
inlinevirtual |
◆ nextDoc()
virtual int32_t Lucene::ReqExclScorer::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::ReqExclScorer::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.
Implements Lucene::Scorer.
◆ shared_from_this()
boost::shared_ptr< ReqExclScorer > Lucene::ReqExclScorer::shared_from_this |
( |
| ) |
|
|
inline |
◆ toNonExcluded()
int32_t Lucene::ReqExclScorer::toNonExcluded |
( |
| ) |
|
|
protected |
Advance to non excluded doc.
On entry:
-
reqScorer != null,
-
exclScorer != null,
-
reqScorer was advanced once via next() or skipTo() and reqScorer.doc() may still be excluded.
Advances reqScorer a non excluded required doc, if any.
- Returns
- true iff there is a non excluded required doc.
◆ doc
int32_t Lucene::ReqExclScorer::doc |
|
protected |
◆ exclDisi
◆ reqScorer
The documentation for this class was generated from the following file: