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 static int |
VERSION_START |
EMPTY_ARRAY
Modifier | Constructor and Description |
---|---|
|
UniformSplitTermsReader(PostingsReaderBase postingsReader,
SegmentReadState state,
BlockDecoder blockDecoder) |
protected |
UniformSplitTermsReader(PostingsReaderBase postingsReader,
SegmentReadState state,
BlockDecoder blockDecoder,
String codecName,
int versionStart,
int versionCurrent,
String termsBlocksExtension,
String dictionaryExtension) |
Modifier and Type | Method and Description |
---|---|
void |
checkIntegrity()
Checks consistency of this reader.
|
void |
close() |
protected void |
fillFieldMap(PostingsReaderBase postingsReader,
BlockDecoder blockDecoder,
IndexInput dictionaryInput,
IndexInput blockInput,
Collection<FieldMetadata> fieldMetadataCollection,
FieldInfos fieldInfos) |
protected long |
getTermsRamBytesUsed() |
Iterator<String> |
iterator()
Returns an iterator that will step through all fields
names.
|
protected static Collection<FieldMetadata> |
parseFieldsMetadata(IndexInput indexInput,
FieldInfos fieldInfos) |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
protected static void |
seekFieldsMetadata(IndexInput indexInput)
Positions the given
IndexInput at the beginning of the fields metadata. |
int |
size()
Returns the number of fields or -1 if the number of
distinct field names is unknown.
|
Terms |
terms(String field)
Get the
Terms for this field. |
getMergeInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
forEach, spliterator
protected static final int VERSION_START
protected final PostingsReaderBase postingsReader
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) throws IOException
blockDecoder
- Optional block decoder, may be null if none.
It can be used for decompression or decryption.IOException
protected UniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, String codecName, int versionStart, int versionCurrent, String termsBlocksExtension, String dictionaryExtension) throws IOException
blockDecoder
- Optional block decoder, may be null if none.
It can be used for decompression or decryption.IOException
protected void fillFieldMap(PostingsReaderBase postingsReader, BlockDecoder blockDecoder, IndexInput dictionaryInput, IndexInput blockInput, Collection<FieldMetadata> fieldMetadataCollection, FieldInfos fieldInfos) throws IOException
IOException
protected static Collection<FieldMetadata> parseFieldsMetadata(IndexInput indexInput, FieldInfos fieldInfos) throws IOException
indexInput
- IndexInput
must be positioned to the fields metadata
details by calling seekFieldsMetadata(IndexInput)
before this call.IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FieldsProducer
IOException
public void checkIntegrity() throws IOException
FieldsProducer
Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
checkIntegrity
in class FieldsProducer
IOException
public Iterator<String> iterator()
Fields
public Terms terms(String field)
Fields
Terms
for this field. This will return
null if the field does not exist.public int size()
Fields
Fields.iterator()
will return as many field names.public long ramBytesUsed()
Accountable
protected long getTermsRamBytesUsed()
protected static void seekFieldsMetadata(IndexInput indexInput) throws IOException
IndexInput
at the beginning of the fields metadata.IOException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.