Module org.apache.lucene.misc
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:
Closeable,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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteDocument(int docID) protected voiddoClose()Implements close.Optional method: Return aIndexReader.CacheHelperthat can be used to cache based on the content of this reader.(package private) final List<? extends MultiPassIndexSplitter.FakeDeleteLeafIndexReader> private static MultiPassIndexSplitter.FakeDeleteLeafIndexReader[]initSubReaders(IndexReader reader) voidMethods inherited from class org.apache.lucene.index.BaseCompositeReader
docFreq, document, getDocCount, getSequentialSubReaders, getSumDocFreq, getSumTotalTermFreq, getTermVectors, maxDoc, numDocs, readerBase, readerIndex, storedFields, termVectors, totalTermFreqMethods inherited from class org.apache.lucene.index.CompositeReader
getContext, toStringMethods 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 Details
-
FakeDeleteIndexReader
- Throws:
IOException
-
-
Method Details
-
initSubReaders
private static MultiPassIndexSplitter.FakeDeleteLeafIndexReader[] initSubReaders(IndexReader reader) throws IOException - Throws:
IOException
-
deleteDocument
public void deleteDocument(int docID) -
undeleteAll
public void undeleteAll() -
doClose
protected void doClose()Description copied from class:IndexReaderImplements close.- Specified by:
doClosein classIndexReader
-
getReaderCacheHelper
Description copied from class:IndexReaderOptional method: Return aIndexReader.CacheHelperthat 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
nullindicates 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:
getReaderCacheHelperin classIndexReader
-
getSequentialSubReadersWrapper
final List<? extends MultiPassIndexSplitter.FakeDeleteLeafIndexReader> getSequentialSubReadersWrapper()
-