Package org.apache.solr.uninverting
Class UninvertingReader
- java.lang.Object
- 
- org.apache.lucene.index.IndexReader
- 
- org.apache.lucene.index.LeafReader
- 
- org.apache.lucene.index.FilterLeafReader
- 
- org.apache.solr.uninverting.UninvertingReader
 
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 public class UninvertingReader extends org.apache.lucene.index.FilterLeafReaderA FilterReader that exposes indexed values as if they also had docvalues.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.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classUninvertingReader.FieldCacheStatsReturn information about the backing cachestatic classUninvertingReader.TypeSpecifies the type of uninversion to apply for the field.- 
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterLeafReaderorg.apache.lucene.index.FilterLeafReader.FilterFields, org.apache.lucene.index.FilterLeafReader.FilterPostingsEnum, org.apache.lucene.index.FilterLeafReader.FilterTerms, org.apache.lucene.index.FilterLeafReader.FilterTermsEnum
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.index.BinaryDocValuesgetBinaryDocValues(String field)org.apache.lucene.index.IndexReader.CacheHelpergetCoreCacheHelper()org.apache.lucene.index.FieldInfosgetFieldInfos()org.apache.lucene.index.NumericDocValuesgetNumericDocValues(String field)org.apache.lucene.index.IndexReader.CacheHelpergetReaderCacheHelper()org.apache.lucene.index.SortedDocValuesgetSortedDocValues(String field)org.apache.lucene.index.SortedSetDocValuesgetSortedSetDocValues(String field)static UninvertingReader.FieldCacheStatsgetUninvertedStats()Return information about the backing cachestatic intgetUninvertedStatsSize()StringtoString()static org.apache.lucene.index.DirectoryReaderwrap(org.apache.lucene.index.DirectoryReader in, Function<String,UninvertingReader.Type> mapper)Wraps a providedDirectoryReader.static org.apache.lucene.index.DirectoryReaderwrap(org.apache.lucene.index.DirectoryReader reader, Map<String,UninvertingReader.Type> mapping)static org.apache.lucene.index.LeafReaderwrap(org.apache.lucene.index.LeafReader in, Function<String,UninvertingReader.Type> mapping)Create a new UninvertingReader with the specified mapping, wrapped around the input.- 
Methods inherited from class org.apache.lucene.index.FilterLeafReadercheckIntegrity, doClose, document, getDelegate, getLiveDocs, getMetaData, getNormValues, getPointValues, getSortedNumericDocValues, getTermVectors, getVectorValues, maxDoc, numDocs, searchNearestVectors, terms, unwrap
 - 
Methods inherited from class org.apache.lucene.index.LeafReaderdocFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, totalTermFreq
 
- 
 
- 
- 
- 
Method Detail- 
wrappublic static org.apache.lucene.index.DirectoryReader wrap(org.apache.lucene.index.DirectoryReader reader, Map<String,UninvertingReader.Type> mapping) throws IOException- Throws:
- IOException
- See Also:
- wrap(DirectoryReader, Function)
 
 - 
wrappublic static org.apache.lucene.index.DirectoryReader wrap(org.apache.lucene.index.DirectoryReader in, Function<String,UninvertingReader.Type> mapper) throws IOExceptionWraps a providedDirectoryReader. Note that for convenience, the returned reader can be used normally (e.g. passed toDirectoryReader.openIfChanged(DirectoryReader)) and so on.- Parameters:
- in- input directory reader
- mapper- function to map a field name to an uninversion type. A Null result means to not uninvert.
- Returns:
- a wrapped directory reader
- Throws:
- IOException
 
 - 
wrappublic static org.apache.lucene.index.LeafReader wrap(org.apache.lucene.index.LeafReader in, Function<String,UninvertingReader.Type> mapping)Create a new UninvertingReader with the specified mapping, wrapped around the input. It may be deemed that there is no mapping to do, in which case the input is returned.Expert: This should almost never be used. Use wrap(DirectoryReader, Function)instead.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
 
 - 
getFieldInfospublic org.apache.lucene.index.FieldInfos getFieldInfos() - Overrides:
- getFieldInfosin class- org.apache.lucene.index.FilterLeafReader
 
 - 
getNumericDocValuespublic org.apache.lucene.index.NumericDocValues getNumericDocValues(String field) throws IOException - Overrides:
- getNumericDocValuesin class- org.apache.lucene.index.FilterLeafReader
- Throws:
- IOException
 
 - 
getBinaryDocValuespublic org.apache.lucene.index.BinaryDocValues getBinaryDocValues(String field) throws IOException - Overrides:
- getBinaryDocValuesin class- org.apache.lucene.index.FilterLeafReader
- Throws:
- IOException
 
 - 
getSortedDocValuespublic org.apache.lucene.index.SortedDocValues getSortedDocValues(String field) throws IOException - Overrides:
- getSortedDocValuesin class- org.apache.lucene.index.FilterLeafReader
- Throws:
- IOException
 
 - 
getSortedSetDocValuespublic org.apache.lucene.index.SortedSetDocValues getSortedSetDocValues(String field) throws IOException - Overrides:
- getSortedSetDocValuesin class- org.apache.lucene.index.FilterLeafReader
- Throws:
- IOException
 
 - 
getCoreCacheHelperpublic org.apache.lucene.index.IndexReader.CacheHelper getCoreCacheHelper() - Specified by:
- getCoreCacheHelperin class- org.apache.lucene.index.LeafReader
 
 - 
getReaderCacheHelperpublic org.apache.lucene.index.IndexReader.CacheHelper getReaderCacheHelper() - Specified by:
- getReaderCacheHelperin class- org.apache.lucene.index.IndexReader
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- org.apache.lucene.index.FilterLeafReader
 
 - 
getUninvertedStatspublic static UninvertingReader.FieldCacheStats getUninvertedStats() Return information about the backing cache- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
 
 - 
getUninvertedStatsSizepublic static int getUninvertedStatsSize() 
 
- 
 
-