public final class SlowCompositeReaderWrapper
extends org.apache.lucene.index.LeafReader
MultiReader or DirectoryReader) to emulate a
LeafReader. This requires implementing the postings
APIs on-the-fly, using the static methods in MultiTerms, MultiDocValues, by stepping through
the sub-readers to merge fields/terms, appending docs, etc.
NOTE: this class almost always results in a
performance hit. If this is important to your use case,
you'll get better performance by gathering the sub readers using
IndexReader.getContext() to get the
leaves and then operate per-LeafReader,
instead of using this class.
| Modifier and Type | Method and Description |
|---|---|
void |
checkIntegrity() |
protected void |
doClose() |
void |
document(int docID,
org.apache.lucene.index.StoredFieldVisitor visitor) |
org.apache.lucene.index.BinaryDocValues |
getBinaryDocValues(String field) |
org.apache.lucene.index.IndexReader.CacheHelper |
getCoreCacheHelper() |
org.apache.lucene.index.FieldInfos |
getFieldInfos() |
org.apache.lucene.util.Bits |
getLiveDocs() |
org.apache.lucene.index.LeafMetaData |
getMetaData() |
org.apache.lucene.index.NumericDocValues |
getNormValues(String field) |
org.apache.lucene.index.NumericDocValues |
getNumericDocValues(String field) |
org.apache.lucene.index.PointValues |
getPointValues(String field) |
org.apache.lucene.index.IndexReader.CacheHelper |
getReaderCacheHelper() |
org.apache.lucene.index.SortedDocValues |
getSortedDocValues(String field) |
org.apache.lucene.index.SortedNumericDocValues |
getSortedNumericDocValues(String field) |
org.apache.lucene.index.SortedSetDocValues |
getSortedSetDocValues(String field) |
org.apache.lucene.index.Fields |
getTermVectors(int docID) |
int |
maxDoc() |
int |
numDocs() |
org.apache.lucene.index.Terms |
terms(String field) |
String |
toString() |
static org.apache.lucene.index.LeafReader |
wrap(org.apache.lucene.index.IndexReader reader)
This method is sugar for getting an
LeafReader from
an IndexReader of any kind. |
docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreqpublic static org.apache.lucene.index.LeafReader wrap(org.apache.lucene.index.IndexReader reader)
throws IOException
LeafReader from
an IndexReader of any kind. If the reader is already atomic,
it is returned unchanged, otherwise wrapped by this class.IOExceptionpublic org.apache.lucene.index.IndexReader.CacheHelper getReaderCacheHelper()
getReaderCacheHelper in class org.apache.lucene.index.IndexReaderpublic org.apache.lucene.index.IndexReader.CacheHelper getCoreCacheHelper()
getCoreCacheHelper in class org.apache.lucene.index.LeafReaderpublic org.apache.lucene.index.Terms terms(String field) throws IOException
terms in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.NumericDocValues getNumericDocValues(String field) throws IOException
getNumericDocValues in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.BinaryDocValues getBinaryDocValues(String field) throws IOException
getBinaryDocValues in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.SortedNumericDocValues getSortedNumericDocValues(String field) throws IOException
getSortedNumericDocValues in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.SortedDocValues getSortedDocValues(String field) throws IOException
getSortedDocValues in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.SortedSetDocValues getSortedSetDocValues(String field) throws IOException
getSortedSetDocValues in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.NumericDocValues getNormValues(String field) throws IOException
getNormValues in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.Fields getTermVectors(int docID)
throws IOException
getTermVectors in class org.apache.lucene.index.IndexReaderIOExceptionpublic int numDocs()
numDocs in class org.apache.lucene.index.IndexReaderpublic int maxDoc()
maxDoc in class org.apache.lucene.index.IndexReaderpublic void document(int docID,
org.apache.lucene.index.StoredFieldVisitor visitor)
throws IOException
document in class org.apache.lucene.index.IndexReaderIOExceptionpublic org.apache.lucene.util.Bits getLiveDocs()
getLiveDocs in class org.apache.lucene.index.LeafReaderpublic org.apache.lucene.index.PointValues getPointValues(String field)
getPointValues in class org.apache.lucene.index.LeafReaderpublic org.apache.lucene.index.FieldInfos getFieldInfos()
getFieldInfos in class org.apache.lucene.index.LeafReaderprotected void doClose()
throws IOException
doClose in class org.apache.lucene.index.IndexReaderIOExceptionpublic void checkIntegrity()
throws IOException
checkIntegrity in class org.apache.lucene.index.LeafReaderIOExceptionpublic org.apache.lucene.index.LeafMetaData getMetaData()
getMetaData in class org.apache.lucene.index.LeafReaderCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.