The DocIdSetIterator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DocIdSetIterator | Initializes a new instance of the DocIdSetIterator class |
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:
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.
| |
DocID | Returns the following:
| |
Equals | (Inherited from Object.) | |
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.) | |
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.
| |
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. 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. | |
SkipTo | Obsolete. Unsupported anymore. Call {@link #Advance(int)} instead. This method throws
{@link UnsupportedOperationException} if called.
| |
ToString | (Inherited from Object.) |
Fields
Name | Description | |
---|---|---|
NO_MORE_DOCS | When returned by {@link #NextDoc()}, {@link #Advance(int)} and
{@link #Doc()} it means there are no more docs in the iterator.
|