Class STBlockLine.Serializer
java.lang.Object
org.apache.lucene.codecs.uniformsplit.BlockLine.Serializer
org.apache.lucene.codecs.uniformsplit.sharedterms.STBlockLine.Serializer
- All Implemented Interfaces:
Accountable
- Enclosing class:
STBlockLine
Reads block lines encoded incrementally, with all fields corresponding to the term of the line.
This class extends BlockLine.Serializer, so it
keeps a state of the previous term read to decode the next term.
-
Field Summary
Fields inherited from class org.apache.lucene.codecs.uniformsplit.BlockLine.Serializer
currentTermFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]readFieldIds(DataInput termStatesInput, int numFields) Reads all the field ids in the current block line of the provided input.voidreadFieldTermStatesMap(DataInput termStatesInput, DeltaBaseTermStateSerializer termStateSerializer, BlockHeader blockHeader, FieldInfos fieldInfos, Map<String, BlockTermState> fieldTermStatesMap) Reads all theBlockTermStateof all the field in the current block line of the provided input.readTermStateForField(int fieldId, DataInput termStatesInput, DeltaBaseTermStateSerializer termStateSerializer, BlockHeader blockHeader, FieldInfos fieldInfos, BlockTermState reuse) Reads a singleBlockTermStatefor the provided field in the current block line of the provided input.voidwriteLineTermStates(DataOutput termStatesOutput, STBlockLine line, DeltaBaseTermStateSerializer encoder) Writes all theBlockTermStateof the providedSTBlockLineto the given output.Methods inherited from class org.apache.lucene.codecs.uniformsplit.BlockLine.Serializer
numBitsToEncode, ramBytesUsed, readBytes, readIncrementallyEncodedTerm, readLine, writeIncrementallyEncodedTerm, writeLine, writeLineTermStateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
readTermStateForField
public BlockTermState readTermStateForField(int fieldId, DataInput termStatesInput, DeltaBaseTermStateSerializer termStateSerializer, BlockHeader blockHeader, FieldInfos fieldInfos, BlockTermState reuse) throws IOException Reads a singleBlockTermStatefor the provided field in the current block line of the provided input.- Parameters:
termStatesInput- Data input to read theBlockTermStatefrom.blockHeader- Current block header.reuse- A previousBlockTermStateto reuse; or null to create a new one.- Returns:
- The
BlockTermStatecorresponding to the provided field id; or null if the field does not occur in the line. - Throws:
IOException
-
readFieldTermStatesMap
public void readFieldTermStatesMap(DataInput termStatesInput, DeltaBaseTermStateSerializer termStateSerializer, BlockHeader blockHeader, FieldInfos fieldInfos, Map<String, BlockTermState> fieldTermStatesMap) throws IOExceptionReads all theBlockTermStateof all the field in the current block line of the provided input.- Parameters:
fieldTermStatesMap- Map filled with the term states for each field. It is cleared first.- Throws:
IOException- See Also:
-
readFieldIds
Reads all the field ids in the current block line of the provided input.- Throws:
IOException