Package org.apache.lucene.index
Class ExitableDirectoryReader.ExitableFilterAtomicReader
- java.lang.Object
-
- org.apache.lucene.index.IndexReader
-
- org.apache.lucene.index.LeafReader
-
- org.apache.lucene.index.FilterLeafReader
-
- org.apache.lucene.index.ExitableDirectoryReader.ExitableFilterAtomicReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- ExitableDirectoryReader
public static class ExitableDirectoryReader.ExitableFilterAtomicReader extends FilterLeafReader
Wrapper class for another FilterAtomicReader. This is used by ExitableSubReaderWrapper.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterLeafReader
FilterLeafReader.FilterFields, FilterLeafReader.FilterPostingsEnum, FilterLeafReader.FilterTerms, FilterLeafReader.FilterTermsEnum
-
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.CacheHelper, IndexReader.CacheKey, IndexReader.ClosedListener
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intDOCS_BETWEEN_TIMEOUT_CHECKprivate QueryTimeoutqueryTimeout-
Fields inherited from class org.apache.lucene.index.FilterLeafReader
in
-
-
Constructor Summary
Constructors Constructor Description ExitableFilterAtomicReader(LeafReader in, QueryTimeout queryTimeout)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckAndThrow(DocIdSetIterator in)ThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true.BinaryDocValuesgetBinaryDocValues(java.lang.String field)ReturnsBinaryDocValuesfor this field, or null if no binary doc values were indexed for this field.IndexReader.CacheHelpergetCoreCacheHelper()Optional method: Return aIndexReader.CacheHelperthat can be used to cache based on the content of this leaf regardless of deletions.NumericDocValuesgetNumericDocValues(java.lang.String field)ReturnsNumericDocValuesfor this field, or null if no numeric doc values were indexed for this field.PointValuesgetPointValues(java.lang.String field)Returns thePointValuesused for numeric or spatial searches for the given field, or null if there are no point fields.IndexReader.CacheHelpergetReaderCacheHelper()Optional method: Return aIndexReader.CacheHelperthat can be used to cache based on the content of this reader.SortedDocValuesgetSortedDocValues(java.lang.String field)ReturnsSortedDocValuesfor this field, or null if noSortedDocValueswere indexed for this field.SortedNumericDocValuesgetSortedNumericDocValues(java.lang.String field)ReturnsSortedNumericDocValuesfor this field, or null if noSortedNumericDocValueswere indexed for this field.SortedSetDocValuesgetSortedSetDocValues(java.lang.String field)ReturnsSortedSetDocValuesfor this field, or null if noSortedSetDocValueswere indexed for this field.Termsterms(java.lang.String field)Returns theTermsindex for this field, or null if it has none.-
Methods inherited from class org.apache.lucene.index.FilterLeafReader
checkIntegrity, doClose, document, getDelegate, getFieldInfos, getLiveDocs, getMetaData, getNormValues, getTermVectors, maxDoc, numDocs, toString, unwrap
-
Methods inherited from class org.apache.lucene.index.LeafReader
docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreq
-
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
-
-
-
-
Field Detail
-
queryTimeout
private final QueryTimeout queryTimeout
-
DOCS_BETWEEN_TIMEOUT_CHECK
static final int DOCS_BETWEEN_TIMEOUT_CHECK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExitableFilterAtomicReader
public ExitableFilterAtomicReader(LeafReader in, QueryTimeout queryTimeout)
Constructor
-
-
Method Detail
-
getPointValues
public PointValues getPointValues(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturns thePointValuesused for numeric or spatial searches for the given field, or null if there are no point fields.- Overrides:
getPointValuesin classFilterLeafReader- Throws:
java.io.IOException
-
terms
public Terms terms(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturns theTermsindex for this field, or null if it has none.- Overrides:
termsin classFilterLeafReader- Throws:
java.io.IOException
-
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
-
getCoreCacheHelper
public IndexReader.CacheHelper getCoreCacheHelper()
Description copied from class:LeafReaderOptional method: Return aIndexReader.CacheHelperthat can be used to cache based on the content of this leaf regardless of deletions. Two readers that have the same data but different sets of deleted documents or doc values updates may be considered equal. Consider usingIndexReader.getReaderCacheHelper()if you need deletions or dv updates to be taken into account.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 leaf reader.- Specified by:
getCoreCacheHelperin classLeafReader
-
getNumericDocValues
public NumericDocValues getNumericDocValues(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturnsNumericDocValuesfor this field, or null if no numeric doc values were indexed for this field. The returned instance should only be used by a single thread.- Overrides:
getNumericDocValuesin classFilterLeafReader- Throws:
java.io.IOException
-
getBinaryDocValues
public BinaryDocValues getBinaryDocValues(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturnsBinaryDocValuesfor this field, or null if no binary doc values were indexed for this field. The returned instance should only be used by a single thread.- Overrides:
getBinaryDocValuesin classFilterLeafReader- Throws:
java.io.IOException
-
getSortedDocValues
public SortedDocValues getSortedDocValues(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturnsSortedDocValuesfor this field, or null if noSortedDocValueswere indexed for this field. The returned instance should only be used by a single thread.- Overrides:
getSortedDocValuesin classFilterLeafReader- Throws:
java.io.IOException
-
getSortedNumericDocValues
public SortedNumericDocValues getSortedNumericDocValues(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturnsSortedNumericDocValuesfor this field, or null if noSortedNumericDocValueswere indexed for this field. The returned instance should only be used by a single thread.- Overrides:
getSortedNumericDocValuesin classFilterLeafReader- Throws:
java.io.IOException
-
getSortedSetDocValues
public SortedSetDocValues getSortedSetDocValues(java.lang.String field) throws java.io.IOException
Description copied from class:LeafReaderReturnsSortedSetDocValuesfor this field, or null if noSortedSetDocValueswere indexed for this field. The returned instance should only be used by a single thread.- Overrides:
getSortedSetDocValuesin classFilterLeafReader- Throws:
java.io.IOException
-
checkAndThrow
private void checkAndThrow(DocIdSetIterator in)
ThrowsExitableDirectoryReader.ExitingReaderExceptionifQueryTimeout.shouldExit()returns true, or ifThread.interrupted()returns true.- Parameters:
in- underneath docValues
-
-