public abstract class FilterCodecReader extends CodecReader
FilterCodecReader contains another CodecReader, which it
uses as its basic source of data, possibly transforming the data along the
way or providing additional functionality.
NOTE: If this FilterCodecReader does not change the
content the contained reader, you could consider delegating calls to
LeafReader.getCoreCacheHelper() and IndexReader.getReaderCacheHelper().
IndexReader.CacheHelper, IndexReader.CacheKey, IndexReader.ClosedListener| Modifier and Type | Field and Description |
|---|---|
protected CodecReader |
in
The underlying CodecReader instance.
|
NULL_ACCOUNTABLE| Constructor and Description |
|---|
FilterCodecReader(CodecReader in)
Creates a new FilterCodecReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkIntegrity()
Checks consistency of this reader.
|
protected void |
doClose()
Implements close.
|
Collection<Accountable> |
getChildResources()
Returns nested resources of this class.
|
CodecReader |
getDelegate()
Returns the wrapped
CodecReader. |
DocValuesProducer |
getDocValuesReader()
Expert: retrieve underlying DocValuesProducer
|
FieldInfos |
getFieldInfos()
Get the
FieldInfos describing all fields in
this reader. |
StoredFieldsReader |
getFieldsReader()
Expert: retrieve thread-private StoredFieldsReader
|
Bits |
getLiveDocs()
Returns the
Bits representing live (not
deleted) docs. |
LeafMetaData |
getMetaData()
Return metadata about this leaf.
|
NormsProducer |
getNormsReader()
Expert: retrieve underlying NormsProducer
|
PointsReader |
getPointsReader()
Expert: retrieve underlying PointsReader
|
FieldsProducer |
getPostingsReader()
Expert: retrieve underlying FieldsProducer
|
TermVectorsReader |
getTermVectorsReader()
Expert: retrieve thread-private TermVectorsReader
|
int |
maxDoc()
Returns one greater than the largest possible document number.
|
int |
numDocs()
Returns the number of documents in this index.
|
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
static CodecReader |
unwrap(CodecReader reader)
Get the wrapped instance by
reader as long as this reader is
an instance of FilterCodecReader. |
document, getBinaryDocValues, getNormValues, getNumericDocValues, getPointValues, getSortedDocValues, getSortedNumericDocValues, getSortedSetDocValues, getTermVectors, termsdocFreq, getContext, getCoreCacheHelper, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreqclose, decRef, document, document, ensureOpen, equals, getReaderCacheHelper, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, tryIncRefprotected final CodecReader in
public FilterCodecReader(CodecReader in)
in - the underlying CodecReader instance.public static CodecReader unwrap(CodecReader reader)
reader as long as this reader is
an instance of FilterCodecReader.public StoredFieldsReader getFieldsReader()
CodecReadergetFieldsReader in class CodecReaderpublic TermVectorsReader getTermVectorsReader()
CodecReadergetTermVectorsReader in class CodecReaderpublic NormsProducer getNormsReader()
CodecReadergetNormsReader in class CodecReaderpublic DocValuesProducer getDocValuesReader()
CodecReadergetDocValuesReader in class CodecReaderpublic FieldsProducer getPostingsReader()
CodecReadergetPostingsReader in class CodecReaderpublic Bits getLiveDocs()
LeafReaderBits representing live (not
deleted) docs. A set bit indicates the doc ID has not
been deleted. If this method returns null it means
there are no deleted documents (all documents are
live).
The returned instance has been safely published for
use by multiple threads without additional
synchronization.getLiveDocs in class LeafReaderpublic FieldInfos getFieldInfos()
LeafReaderFieldInfos describing all fields in
this reader.
Note: Implementations should cache the FieldInfos
instance returned by this method such that subsequent
calls to this method return the same instance.getFieldInfos in class LeafReaderpublic PointsReader getPointsReader()
CodecReadergetPointsReader in class CodecReaderpublic int numDocs()
IndexReaderNOTE: This operation may run in O(maxDoc). Implementations that can't return this number in constant-time should cache it.
numDocs in class IndexReaderpublic int maxDoc()
IndexReadermaxDoc in class IndexReaderpublic LeafMetaData getMetaData()
LeafReadergetMetaData in class LeafReaderprotected void doClose()
throws IOException
IndexReaderdoClose in class CodecReaderIOExceptionpublic long ramBytesUsed()
AccountableramBytesUsed in interface AccountableramBytesUsed in class CodecReaderpublic Collection<Accountable> getChildResources()
AccountablegetChildResources in interface AccountablegetChildResources in class CodecReaderAccountablespublic void checkIntegrity()
throws IOException
LeafReaderNote that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
checkIntegrity in class CodecReaderIOExceptionpublic CodecReader getDelegate()
CodecReader.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.