Package org.apache.lucene.misc.index
Class MultiPassIndexSplitter.FakeDeleteIndexReader
- java.lang.Object
-
- org.apache.lucene.index.IndexReader
-
- org.apache.lucene.index.CompositeReader
-
- org.apache.lucene.index.BaseCompositeReader<MultiPassIndexSplitter.FakeDeleteLeafIndexReader>
-
- org.apache.lucene.misc.index.MultiPassIndexSplitter.FakeDeleteIndexReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- MultiPassIndexSplitter
private static final class MultiPassIndexSplitter.FakeDeleteIndexReader extends BaseCompositeReader<MultiPassIndexSplitter.FakeDeleteLeafIndexReader>
This class emulates deletions on the underlying index.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.CacheHelper, IndexReader.CacheKey, IndexReader.ClosedListener
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.index.BaseCompositeReader
subReadersSorter
-
-
Constructor Summary
Constructors Constructor Description FakeDeleteIndexReader(IndexReader reader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteDocument(int docID)
protected void
doClose()
Implements close.IndexReader.CacheHelper
getReaderCacheHelper()
Optional method: Return aIndexReader.CacheHelper
that can be used to cache based on the content of this reader.(package private) java.util.List<? extends MultiPassIndexSplitter.FakeDeleteLeafIndexReader>
getSequentialSubReadersWrapper()
private static MultiPassIndexSplitter.FakeDeleteLeafIndexReader[]
initSubReaders(IndexReader reader)
void
undeleteAll()
-
Methods inherited from class org.apache.lucene.index.BaseCompositeReader
docFreq, document, getDocCount, getSequentialSubReaders, getSumDocFreq, getSumTotalTermFreq, getTermVectors, maxDoc, numDocs, readerBase, readerIndex, totalTermFreq
-
Methods inherited from class org.apache.lucene.index.CompositeReader
getContext, toString
-
Methods inherited from class org.apache.lucene.index.IndexReader
close, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, notifyReaderClosedListeners, numDeletedDocs, registerParentReader, tryIncRef
-
-
-
-
Constructor Detail
-
FakeDeleteIndexReader
public FakeDeleteIndexReader(IndexReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
initSubReaders
private static MultiPassIndexSplitter.FakeDeleteLeafIndexReader[] initSubReaders(IndexReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
deleteDocument
public void deleteDocument(int docID)
-
undeleteAll
public void undeleteAll()
-
doClose
protected void doClose()
Description copied from class:IndexReader
Implements close.- Specified by:
doClose
in classIndexReader
-
getReaderCacheHelper
public IndexReader.CacheHelper getReaderCacheHelper()
Description copied from class:IndexReader
Optional method: Return aIndexReader.CacheHelper
that can be used to cache based on the content of this reader. Two readers that have different data or different sets of deleted documents will be considered different.A return value of
null
indicates that this reader is not suited for caching, which is typically the case for short-lived wrappers that alter the content of the wrapped reader.- Specified by:
getReaderCacheHelper
in classIndexReader
-
getSequentialSubReadersWrapper
final java.util.List<? extends MultiPassIndexSplitter.FakeDeleteLeafIndexReader> getSequentialSubReadersWrapper()
-
-