public class UninvertingReader extends FilterLeafReader
This is accomplished by "inverting the inverted index" or "uninversion".
The uninversion process happens lazily: upon the first request for the
field's docvalues (e.g. via LeafReader.getNumericDocValues(String)
or similar), it will create the docvalues on-the-fly if needed and cache it,
based on the core cache key of the wrapped LeafReader.
| Modifier and Type | Class and Description |
|---|---|
static class |
UninvertingReader.FieldCacheStats
Return information about the backing cache
|
static class |
UninvertingReader.Type
Specifies the type of uninversion to apply for the field.
|
FilterLeafReader.FilterFields, FilterLeafReader.FilterPostingsEnum, FilterLeafReader.FilterTerms, FilterLeafReader.FilterTermsEnumIndexReader.CacheHelper, IndexReader.CacheKey, IndexReader.ClosedListenerin| Modifier and Type | Method and Description |
|---|---|
BinaryDocValues |
getBinaryDocValues(String field) |
IndexReader.CacheHelper |
getCoreCacheHelper() |
FieldInfos |
getFieldInfos() |
NumericDocValues |
getNumericDocValues(String field) |
IndexReader.CacheHelper |
getReaderCacheHelper() |
SortedDocValues |
getSortedDocValues(String field) |
SortedSetDocValues |
getSortedSetDocValues(String field) |
static UninvertingReader.FieldCacheStats |
getUninvertedStats()
Return information about the backing cache
|
static int |
getUninvertedStatsSize() |
String |
toString() |
static DirectoryReader |
wrap(DirectoryReader in,
Function<String,UninvertingReader.Type> mapper)
Wraps a provided
DirectoryReader. |
static DirectoryReader |
wrap(DirectoryReader reader,
Map<String,UninvertingReader.Type> mapping) |
static LeafReader |
wrap(LeafReader in,
Function<String,UninvertingReader.Type> mapping)
Create a new UninvertingReader with the specified mapping, wrapped around the input.
|
checkIntegrity, doClose, document, getDelegate, getLiveDocs, getMetaData, getNormValues, getPointValues, getSortedNumericDocValues, getTermVectors, maxDoc, numDocs, terms, unwrapdocFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreqclose, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, tryIncRefpublic static DirectoryReader wrap(DirectoryReader reader, Map<String,UninvertingReader.Type> mapping) throws IOException
IOExceptionwrap(DirectoryReader, Function)public static DirectoryReader wrap(DirectoryReader in, Function<String,UninvertingReader.Type> mapper) throws IOException
DirectoryReader. Note that for convenience, the returned reader
can be used normally (e.g. passed to DirectoryReader.openIfChanged(DirectoryReader))
and so on.in - input directory readermapper - function to map a field name to an uninversion type. A Null result means to not uninvert.IOExceptionpublic static LeafReader wrap(LeafReader in, Function<String,UninvertingReader.Type> mapping)
Expert: This should almost never be used. Use wrap(DirectoryReader, Function) instead.
public FieldInfos getFieldInfos()
getFieldInfos in class FilterLeafReaderpublic NumericDocValues getNumericDocValues(String field) throws IOException
getNumericDocValues in class FilterLeafReaderIOExceptionpublic BinaryDocValues getBinaryDocValues(String field) throws IOException
getBinaryDocValues in class FilterLeafReaderIOExceptionpublic SortedDocValues getSortedDocValues(String field) throws IOException
getSortedDocValues in class FilterLeafReaderIOExceptionpublic SortedSetDocValues getSortedSetDocValues(String field) throws IOException
getSortedSetDocValues in class FilterLeafReaderIOExceptionpublic IndexReader.CacheHelper getCoreCacheHelper()
getCoreCacheHelper in class LeafReaderpublic IndexReader.CacheHelper getReaderCacheHelper()
getReaderCacheHelper in class IndexReaderpublic String toString()
toString in class FilterLeafReaderpublic static UninvertingReader.FieldCacheStats getUninvertedStats()
public static int getUninvertedStatsSize()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.