public final class SortingCodecReader extends FilterCodecReader
CodecReader which supports sorting documents by a given
Sort. This can be used to re-sort and index after it's been created by wrapping all
readers of the index with this reader and adding it to a fresh IndexWriter via
IndexWriter.addIndexes(CodecReader...).
NOTE: This reader should only be used for merging. Pulling fields from this reader might be very costly and memory
intensive.IndexReader.CacheHelper, IndexReader.CacheKey, IndexReader.ClosedListenerinNULL_ACCOUNTABLE| Modifier and Type | Method and Description |
|---|---|
IndexReader.CacheHelper |
getCoreCacheHelper()
Optional method: Return a
IndexReader.CacheHelper that can be used to cache
based on the content of this leaf regardless of deletions. |
DocValuesProducer |
getDocValuesReader()
Expert: retrieve underlying DocValuesProducer
|
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
|
IndexReader.CacheHelper |
getReaderCacheHelper()
Optional method: Return a
IndexReader.CacheHelper that can be used to cache
based on the content of this reader. |
TermVectorsReader |
getTermVectorsReader()
Expert: retrieve thread-private TermVectorsReader
|
String |
toString() |
static CodecReader |
wrap(CodecReader reader,
Sort sort)
Return a sorted view of
reader according to the order
defined by sort. |
checkIntegrity, doClose, getChildResources, getDelegate, getFieldInfos, maxDoc, numDocs, ramBytesUsed, unwrapdocument, getBinaryDocValues, getNormValues, getNumericDocValues, getPointValues, getSortedDocValues, getSortedNumericDocValues, getSortedSetDocValues, getTermVectors, termsdocFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreqclose, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, tryIncRefpublic static CodecReader wrap(CodecReader reader, Sort sort) throws IOException
reader according to the order
defined by sort. If the reader is already sorted, this
method might return the reader as-is.IOExceptionpublic FieldsProducer getPostingsReader()
CodecReadergetPostingsReader in class FilterCodecReaderpublic StoredFieldsReader getFieldsReader()
CodecReadergetFieldsReader in class FilterCodecReaderpublic 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 FilterCodecReaderpublic PointsReader getPointsReader()
CodecReadergetPointsReader in class FilterCodecReaderpublic NormsProducer getNormsReader()
CodecReadergetNormsReader in class FilterCodecReaderpublic DocValuesProducer getDocValuesReader()
CodecReadergetDocValuesReader in class FilterCodecReaderpublic TermVectorsReader getTermVectorsReader()
CodecReadergetTermVectorsReader in class FilterCodecReaderpublic IndexReader.CacheHelper getCoreCacheHelper()
LeafReaderIndexReader.CacheHelper that 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 using
IndexReader.getReaderCacheHelper() if you need deletions or dv updates to be
taken into account.
A return value of null indicates 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.
getCoreCacheHelper in class LeafReaderpublic IndexReader.CacheHelper getReaderCacheHelper()
IndexReaderIndexReader.CacheHelper that 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 null indicates 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.
getReaderCacheHelper in class IndexReaderpublic LeafMetaData getMetaData()
LeafReadergetMetaData in class FilterCodecReaderCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.