public class UniformSplitTermsReader extends FieldsProducer
UniformSplitTermsWriter
Modifier and Type | Field and Description |
---|---|
protected IndexInput |
blockInput |
protected IndexInput |
dictionaryInput |
protected Map<String,UniformSplitTerms> |
fieldToTermsMap |
protected PostingsReaderBase |
postingsReader |
protected Collection<String> |
sortedFieldNames |
protected int |
version |
EMPTY_ARRAY
NULL_ACCOUNTABLE
Modifier | Constructor and Description |
---|---|
|
UniformSplitTermsReader(PostingsReaderBase postingsReader,
SegmentReadState state,
BlockDecoder blockDecoder,
boolean dictionaryOnHeap) |
protected |
UniformSplitTermsReader(PostingsReaderBase postingsReader,
SegmentReadState state,
BlockDecoder blockDecoder,
boolean dictionaryOnHeap,
FieldMetadata.Serializer fieldMetadataReader,
String codecName,
int versionStart,
int versionCurrent,
String termsBlocksExtension,
String dictionaryExtension) |
Modifier and Type | Method and Description |
---|---|
void |
checkIntegrity() |
void |
close() |
protected IndexDictionary.BrowserSupplier |
createDictionaryBrowserSupplier(SegmentReadState state,
IndexInput dictionaryInput,
FieldMetadata fieldMetadata,
BlockDecoder blockDecoder,
boolean dictionaryOnHeap) |
protected void |
fillFieldMap(PostingsReaderBase postingsReader,
SegmentReadState state,
BlockDecoder blockDecoder,
boolean dictionaryOnHeap,
IndexInput dictionaryInput,
IndexInput blockInput,
Collection<FieldMetadata> fieldMetadataCollection,
FieldInfos fieldInfos) |
protected long |
getTermsRamBytesUsed() |
Iterator<String> |
iterator() |
long |
ramBytesUsed() |
protected Collection<FieldMetadata> |
readEncodedFieldsMetadata(int numFields,
DataInput metadataInput,
BlockDecoder blockDecoder,
FieldInfos fieldInfos,
FieldMetadata.Serializer fieldMetadataReader,
int maxNumDocs) |
protected Collection<FieldMetadata> |
readFieldsMetadata(IndexInput indexInput,
BlockDecoder blockDecoder,
FieldInfos fieldInfos,
FieldMetadata.Serializer fieldMetadataReader,
int maxNumDocs) |
protected Collection<FieldMetadata> |
readUnencodedFieldsMetadata(int numFields,
DataInput metadataInput,
FieldInfos fieldInfos,
FieldMetadata.Serializer fieldMetadataReader,
int maxNumDocs) |
protected void |
seekFieldsMetadata(IndexInput indexInput)
Positions the given
IndexInput at the beginning of the fields metadata. |
int |
size() |
Terms |
terms(String field) |
getMergeInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
forEach, spliterator
protected final PostingsReaderBase postingsReader
protected final int version
protected final IndexInput blockInput
protected final IndexInput dictionaryInput
protected final Map<String,UniformSplitTerms> fieldToTermsMap
protected final Collection<String> sortedFieldNames
public UniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, boolean dictionaryOnHeap) throws IOException
blockDecoder
- Optional block decoder, may be null if none.
It can be used for decompression or decryption.dictionaryOnHeap
- Whether to force loading the terms dictionary on-heap. By default it is kept off-heap without
impact on performance. If block encoding/decoding is used, then the dictionary is always
loaded on-heap whatever this parameter value is.IOException
protected UniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, boolean dictionaryOnHeap, FieldMetadata.Serializer fieldMetadataReader, String codecName, int versionStart, int versionCurrent, String termsBlocksExtension, String dictionaryExtension) throws IOException
protected void fillFieldMap(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, boolean dictionaryOnHeap, IndexInput dictionaryInput, IndexInput blockInput, Collection<FieldMetadata> fieldMetadataCollection, FieldInfos fieldInfos) throws IOException
IOException
protected IndexDictionary.BrowserSupplier createDictionaryBrowserSupplier(SegmentReadState state, IndexInput dictionaryInput, FieldMetadata fieldMetadata, BlockDecoder blockDecoder, boolean dictionaryOnHeap) throws IOException
IOException
protected Collection<FieldMetadata> readFieldsMetadata(IndexInput indexInput, BlockDecoder blockDecoder, FieldInfos fieldInfos, FieldMetadata.Serializer fieldMetadataReader, int maxNumDocs) throws IOException
indexInput
- IndexInput
must be positioned to the fields metadata
details by calling seekFieldsMetadata(IndexInput)
before this call.blockDecoder
- Optional block decoder, may be null if none.IOException
protected Collection<FieldMetadata> readEncodedFieldsMetadata(int numFields, DataInput metadataInput, BlockDecoder blockDecoder, FieldInfos fieldInfos, FieldMetadata.Serializer fieldMetadataReader, int maxNumDocs) throws IOException
IOException
protected Collection<FieldMetadata> readUnencodedFieldsMetadata(int numFields, DataInput metadataInput, FieldInfos fieldInfos, FieldMetadata.Serializer fieldMetadataReader, int maxNumDocs) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FieldsProducer
IOException
public void checkIntegrity() throws IOException
checkIntegrity
in class FieldsProducer
IOException
public long ramBytesUsed()
protected long getTermsRamBytesUsed()
protected void seekFieldsMetadata(IndexInput indexInput) throws IOException
IndexInput
at the beginning of the fields metadata.IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.