Package org.apache.lucene.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.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
-
-
Constructor Summary
Constructors Constructor Description FakeDeleteIndexReader(IndexReader reader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteDocument(int docID)protected voiddoClose()Implements close.IndexReader.CacheHelpergetReaderCacheHelper()Optional method: Return aIndexReader.CacheHelperthat can be used to cache based on the content of this reader.private static MultiPassIndexSplitter.FakeDeleteLeafIndexReader[]initSubReaders(IndexReader reader)voidundeleteAll()-
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:IndexReaderImplements close.- Specified by:
doClosein classIndexReader
-
getReaderCacheHelper
public IndexReader.CacheHelper 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
-
-