org.apache.lucene.index
Class SlowMultiReaderWrapper

java.lang.Object
  extended by org.apache.lucene.index.IndexReader
      extended by org.apache.lucene.index.MultiReader
          extended by org.apache.lucene.index.SlowMultiReaderWrapper
All Implemented Interfaces:
Closeable, Cloneable

public class SlowMultiReaderWrapper
extends MultiReader

Acts like Lucene 4.x's SlowMultiReaderWrapper for testing of top-level MultiTermEnum, MultiTermDocs, ...


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
 
Field Summary
 
Fields inherited from class org.apache.lucene.index.MultiReader
starts, subReaders
 
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
 
Constructor Summary
SlowMultiReaderWrapper(IndexReader reader)
           
 
Method Summary
 FieldInfos getFieldInfos()
          Get the FieldInfos describing all fields in this reader.
 IndexReader[] getSequentialSubReaders()
          Expert: returns the sequential sub readers that this reader is logically composed of.
 String toString()
          
 
Methods inherited from class org.apache.lucene.index.MultiReader
clone, clone, docFreq, doClose, doCommit, document, doDelete, doOpenIfChanged, doOpenIfChanged, doSetNorm, doUndeleteAll, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getVersion, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, readerIndex, termDocs, termDocs, termPositions, terms, terms
 
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, close, commit, commit, decRef, deleteDocument, deleteDocuments, directory, document, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCoreCacheKey, getCurrentVersion, getDeletesCacheKey, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SlowMultiReaderWrapper

public SlowMultiReaderWrapper(IndexReader reader)
Method Detail

getSequentialSubReaders

public IndexReader[] getSequentialSubReaders()
Description copied from class: IndexReader
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers).

NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through IndexReader.open(org.apache.lucene.store.Directory). Use the parent reader directly.

Overrides:
getSequentialSubReaders in class MultiReader

toString

public String toString()
Description copied from class: IndexReader

Overrides:
toString in class IndexReader

getFieldInfos

public FieldInfos getFieldInfos()
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Overrides:
getFieldInfos in class MultiReader