com.senseidb.search.query.filters
Class TermDocIdSetIterator
java.lang.Object
org.apache.lucene.search.DocIdSetIterator
com.senseidb.search.query.filters.TermDocIdSetIterator
public class TermDocIdSetIterator
- extends org.apache.lucene.search.DocIdSetIterator
| Fields inherited from class org.apache.lucene.search.DocIdSetIterator |
NO_MORE_DOCS |
|
Constructor Summary |
TermDocIdSetIterator(org.apache.lucene.index.Term term,
org.apache.lucene.index.IndexReader reader)
Construct a TermDocIdSetIterator. |
TermDocIdSetIterator(org.apache.lucene.index.Term term,
org.apache.lucene.index.IndexReader reader,
int buffer)
Construct a TermDocIdSetIterator. |
|
Method Summary |
int |
advance(int target)
Advances to the first match beyond the current whose document number is
greater than or equal to a given target. |
int |
docID()
|
int |
nextDoc()
Advances to the next document matching the query. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TermDocIdSetIterator
public TermDocIdSetIterator(org.apache.lucene.index.Term term,
org.apache.lucene.index.IndexReader reader,
int buffer)
throws IOException
- Construct a
TermDocIdSetIterator.
- Parameters:
term - Termreader - IndexReader.buffer - Number of docs to buffered the read for
- Throws:
IOException
TermDocIdSetIterator
public TermDocIdSetIterator(org.apache.lucene.index.Term term,
org.apache.lucene.index.IndexReader reader)
throws IOException
- Construct a
TermDocIdSetIterator.
- Parameters:
term - Termreader - IndexReader.
- Throws:
IOException
docID
public int docID()
- Specified by:
docID in class org.apache.lucene.search.DocIdSetIterator
nextDoc
public int nextDoc()
throws IOException
- Advances to the next document matching the query.
The iterator over the matching documents is buffered using
TermDocs.read(int[],int[]).
- Specified by:
nextDoc in class org.apache.lucene.search.DocIdSetIterator
- Returns:
- the document matching the query or NO_MORE_DOCS if there are no more documents.
- Throws:
IOException
advance
public int advance(int target)
throws IOException
- Advances to the first match beyond the current whose document number is
greater than or equal to a given target.
The implementation uses TermDocs.skipTo(int).
- Specified by:
advance in class org.apache.lucene.search.DocIdSetIterator
- Parameters:
target - The target document number.
- Returns:
- the matching document or NO_MORE_DOCS if none exist.
- Throws:
IOException
Copyright © 2010-2012. All Rights Reserved.