The Scorer type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Scorer | Constructs a Scorer. |
Methods
Name | Description | |
---|---|---|
Advance | Advances to the first beyond the current whose document number is greater
than or equal to target. Returns the current document number or
{@link #NO_MORE_DOCS} if there are no more docs in the set.
Behaves as if written:
(Inherited from DocIdSetIterator.)int advance(int target) { int doc; while ((doc = nextDoc()) < target) { } return doc; }Some implementations are considerably more efficient than that. NOTE: certain implemenations 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 behavior. NOTE: in 3.0 this method will become abstract, following the removal of {@link #SkipTo(int)}. | |
Doc | Obsolete. Unsupported anymore. Call {@link #DocID()} instead. This method throws
{@link UnsupportedOperationException} if called.
(Inherited from DocIdSetIterator.) | |
DocID | Returns the following:
(Inherited from DocIdSetIterator.)
| |
Equals | (Inherited from Object.) | |
Explain | Returns an explanation of the score for a document.
When this method is used, the {@link #Next()}, {@link #SkipTo(int)} and {@link #Score(HitCollector)} methods should not be used. | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetSimilarity | Returns the Similarity implementation used by this scorer. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Next | Obsolete. Unsupported anymore. Call {@link #NextDoc()} instead. This method throws
{@link UnsupportedOperationException} if called.
(Inherited from DocIdSetIterator.) | |
NextDoc | Advances to the next document in the set and returns the doc it is
currently on, or {@link #NO_MORE_DOCS} if there are no more docs in the
set. (Inherited from DocIdSetIterator.)NOTE: in 3.0 this method will become abstract, following the removal of {@link #Next()}. For backward compatibility it is implemented as: public int nextDoc() throws IOException { return next() ? doc() : NO_MORE_DOCS; }NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior. | |
Score()()()() | Returns the score of the current document matching the query.
Initially invalid, until {@link #Next()} or {@link #SkipTo(int)}
is called the first time, or when called from within
{@link Collector#collect}.
| |
Score(Collector) | Scores and collects all matching documents. | |
Score(HitCollector) | Obsolete. Scores and collects all matching documents. | |
Score(HitCollector, Int32) | Obsolete. Expert: Collects matching documents in a range. Hook for optimization.
Note that {@link #Next()} must be called once before this method is called
for the first time.
| |
Score(Collector, Int32, Int32) | Expert: Collects matching documents in a range. Hook for optimization.
Note, CopyC# firstDocID | |
SkipTo | Obsolete. Unsupported anymore. Call {@link #Advance(int)} instead. This method throws
{@link UnsupportedOperationException} if called.
(Inherited from DocIdSetIterator.) | |
ToString | (Inherited from Object.) |