org.apache.lucene.index
public class ParallelReader extends IndexReader
This is useful, e.g., with collections that have large fields which change rarely and small fields that change more frequently. The smaller fields may be re-indexed in a new index and both indexes may be searched together.
Warning: It is up to you to make sure all indexes are created and modified the same way. For example, if you add documents to one index, you need to add the same documents in the same order to the other indexes. Failure to do so will result in undefined behavior.
Constructor Summary | |
---|---|
ParallelReader() Construct a ParallelReader. |
Method Summary | |
---|---|
void | add(IndexReader reader) Add an IndexReader. |
void | add(IndexReader reader, boolean ignoreStoredFields) Add an IndexReader whose stored fields will not be returned. |
int | docFreq(Term term) |
Document | document(int n, FieldSelector fieldSelector) |
protected void | doClose() |
protected void | doCommit() |
protected void | doDelete(int n) |
protected void | doSetNorm(int n, String field, byte value) |
protected void | doUndeleteAll() |
Collection | getFieldNames(IndexReader.FieldOption fieldNames) |
TermFreqVector | getTermFreqVector(int n, String field) |
TermFreqVector[] | getTermFreqVectors(int n) |
boolean | hasDeletions() |
boolean | hasNorms(String field) |
boolean | isDeleted(int n) |
int | maxDoc() |
byte[] | norms(String field) |
void | norms(String field, byte[] result, int offset) |
int | numDocs() |
TermDocs | termDocs(Term term) |
TermDocs | termDocs() |
TermPositions | termPositions(Term term) |
TermPositions | termPositions() |
TermEnum | terms() |
TermEnum | terms(Term term) |
Throws: IOException if there is a low-level IO error
Throws: IllegalArgumentException if not all indexes contain the same number of documents IllegalArgumentException if not all indexes have the same value of maxDoc IOException if there is a low-level IO error