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. |
getMergeInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildResources
protected 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.IOException
protected 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.IOException
protected void fillFieldMap(PostingsReaderBase postingsReader, BlockDecoder blockDecoder, IndexInput dictionaryInput, IndexInput blockInput, java.util.Collection<FieldMetadata> fieldMetadataCollection, FieldInfos fieldInfos) throws java.io.IOException
java.io.IOException
protected 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.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class FieldsProducer
java.io.IOException
public void checkIntegrity() throws java.io.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
java.io.IOException
public java.util.Iterator<java.lang.String> iterator()
Fields
public Terms terms(java.lang.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 java.io.IOException
IndexInput
at the beginning of the fields metadata.java.io.IOException