public class UniformSplitTermsReader extends FieldsProducer
UniformSplitTermsWriter| Modifier and Type | Field and Description |
|---|---|
private static long |
BASE_RAM_USAGE |
protected IndexInput |
blockInput |
protected IndexInput |
dictionaryInput |
protected java.util.Map<java.lang.String,UniformSplitTerms> |
fieldToTermsMap |
protected PostingsReaderBase |
postingsReader |
protected java.util.Collection<java.lang.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,
java.lang.String codecName,
int versionStart,
int versionCurrent,
java.lang.String termsBlocksExtension,
java.lang.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,
java.util.Collection<FieldMetadata> fieldMetadataCollection,
FieldInfos fieldInfos) |
protected long |
getTermsRamBytesUsed() |
java.util.Iterator<java.lang.String> |
iterator()
Returns an iterator that will step through all fields
names.
|
protected static java.util.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(java.lang.String field)
Get the
Terms for this field. |
getMergeInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildResourcesprotected static final int VERSION_START
private static final long BASE_RAM_USAGE
protected final PostingsReaderBase postingsReader
protected final IndexInput blockInput
protected final IndexInput dictionaryInput
protected final java.util.Map<java.lang.String,UniformSplitTerms> fieldToTermsMap
protected final java.util.Collection<java.lang.String> sortedFieldNames
public UniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder) throws java.io.IOException
blockDecoder - Optional block decoder, may be null if none.
It can be used for decompression or decryption.java.io.IOExceptionprotected UniformSplitTermsReader(PostingsReaderBase postingsReader, SegmentReadState state, BlockDecoder blockDecoder, java.lang.String codecName, int versionStart, int versionCurrent, java.lang.String termsBlocksExtension, java.lang.String dictionaryExtension) throws java.io.IOException
blockDecoder - Optional block decoder, may be null if none.
It can be used for decompression or decryption.java.io.IOExceptionprotected void fillFieldMap(PostingsReaderBase postingsReader, BlockDecoder blockDecoder, IndexInput dictionaryInput, IndexInput blockInput, java.util.Collection<FieldMetadata> fieldMetadataCollection, FieldInfos fieldInfos) throws java.io.IOException
java.io.IOExceptionprotected static java.util.Collection<FieldMetadata> parseFieldsMetadata(IndexInput indexInput, FieldInfos fieldInfos) throws java.io.IOException
indexInput - IndexInput must be positioned to the fields metadata
details by calling seekFieldsMetadata(IndexInput) before this call.java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class FieldsProducerjava.io.IOExceptionpublic void checkIntegrity()
throws java.io.IOException
FieldsProducerNote 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 FieldsProducerjava.io.IOExceptionpublic java.util.Iterator<java.lang.String> iterator()
Fieldspublic Terms terms(java.lang.String field)
FieldsTerms for this field. This will return
null if the field does not exist.public int size()
FieldsFields.iterator() will return as many field names.public long ramBytesUsed()
Accountableprotected long getTermsRamBytesUsed()
protected static void seekFieldsMetadata(IndexInput indexInput) throws java.io.IOException
IndexInput at the beginning of the fields metadata.java.io.IOException