Package org.apache.lucene.index
Class LazySoftDeletesDirectoryReaderWrapper
java.lang.Object
org.apache.lucene.index.IndexReader
org.apache.lucene.index.CompositeReader
org.apache.lucene.index.BaseCompositeReader<org.apache.lucene.index.LeafReader>
org.apache.lucene.index.DirectoryReader
org.apache.lucene.index.FilterDirectoryReader
org.apache.lucene.index.LazySoftDeletesDirectoryReaderWrapper
- All Implemented Interfaces:
 Closeable,AutoCloseable
public final class LazySoftDeletesDirectoryReaderWrapper
extends org.apache.lucene.index.FilterDirectoryReader
This is a modified version of 
SoftDeletesDirectoryReaderWrapper that materializes the liveDocs
 bitset lazily. In contrast to SoftDeletesDirectoryReaderWrapper, this wrapper can only be used
 for non-NRT readers.
 This reader filters out documents that have a doc values value in the given field and treat these
 documents as soft deleted. Hard deleted documents will also be filtered out in the live docs of this reader.- See Also:
 IndexWriterConfig.setSoftDeletesField(String),IndexWriter.softUpdateDocument(Term, Iterable, Field...),SoftDeletesRetentionMergePolicy
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classNested classes/interfaces inherited from class org.apache.lucene.index.FilterDirectoryReader
org.apache.lucene.index.FilterDirectoryReader.SubReaderWrapperNested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
org.apache.lucene.index.IndexReader.CacheHelper, org.apache.lucene.index.IndexReader.CacheKey, org.apache.lucene.index.IndexReader.ClosedListener - 
Field Summary
Fields inherited from class org.apache.lucene.index.FilterDirectoryReader
inFields inherited from class org.apache.lucene.index.DirectoryReader
directoryFields inherited from class org.apache.lucene.index.BaseCompositeReader
subReadersSorter - 
Constructor Summary
ConstructorsConstructorDescriptionLazySoftDeletesDirectoryReaderWrapper(org.apache.lucene.index.DirectoryReader in, String field)Creates a new soft deletes wrapper. - 
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.lucene.index.DirectoryReaderdoWrapDirectoryReader(org.apache.lucene.index.DirectoryReader in)org.apache.lucene.index.IndexReader.CacheHelperMethods inherited from class org.apache.lucene.index.FilterDirectoryReader
doClose, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, getDelegate, getIndexCommit, getVersion, isCurrent, unwrapMethods inherited from class org.apache.lucene.index.DirectoryReader
directory, indexExists, listCommits, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChangedMethods inherited from class org.apache.lucene.index.BaseCompositeReader
docFreq, document, getDocCount, getSequentialSubReaders, getSumDocFreq, getSumTotalTermFreq, getTermVectors, maxDoc, numDocs, readerBase, readerIndex, 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, numDeletedDocs, registerParentReader, tryIncRef 
- 
Constructor Details
- 
LazySoftDeletesDirectoryReaderWrapper
public LazySoftDeletesDirectoryReaderWrapper(org.apache.lucene.index.DirectoryReader in, String field) throws IOExceptionCreates a new soft deletes wrapper.- Parameters:
 in- the incoming directory readerfield- the soft deletes field- Throws:
 IOException
 
 - 
 - 
Method Details
- 
doWrapDirectoryReader
protected org.apache.lucene.index.DirectoryReader doWrapDirectoryReader(org.apache.lucene.index.DirectoryReader in) throws IOException- Specified by:
 doWrapDirectoryReaderin classorg.apache.lucene.index.FilterDirectoryReader- Throws:
 IOException
 - 
getReaderCacheHelper
public org.apache.lucene.index.IndexReader.CacheHelper getReaderCacheHelper()- Specified by:
 getReaderCacheHelperin classorg.apache.lucene.index.IndexReader
 
 -