Interface ForwardIndexCreator
-
- All Superinterfaces:
AutoCloseable,Closeable
public interface ForwardIndexCreator extends Closeable
Interface for forward index creator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FieldSpec.DataTypegetValueType()Returns the data type of the values in the forward index.booleanisDictionaryEncoded()Returnstrueif the forward index is dictionary-encoded,falseif it is raw.booleanisSingleValue()Returnstrueif the forward index is for a single-value column,falseif it is for a multi-value column.default voidputBigDecimal(BigDecimal value)Writes the next BIG_DECIMAL type single-value into the forward index.default voidputBytes(byte[] value)Writes the next BYTES type single-value into the forward index.default voidputBytesMV(byte[][] values)Writes the next byte[] type multi-value into the forward index.default voidputDictId(int dictId)Writes the dictionary id for the next single-value into the forward index.default voidputDictIdMV(int[] dictIds)Writes the dictionary ids for the next multi-value into the forward index.default voidputDouble(double value)Writes the next DOUBLE type single-value into the forward index.default voidputDoubleMV(double[] values)Writes the next DOUBLE type multi-value into the forward index.default voidputFloat(float value)Writes the next FLOAT type single-value into the forward index.default voidputFloatMV(float[] values)Writes the next FLOAT type multi-value into the forward index.default voidputInt(int value)Writes the next INT type single-value into the forward index.default voidputIntMV(int[] values)Writes the next INT type multi-value into the forward index.default voidputLong(long value)Writes the next LONG type single-value into the forward index.default voidputLongMV(long[] values)Writes the next LONG type multi-value into the forward index.default voidputString(String value)Writes the next STRING type single-value into the forward index.default voidputStringMV(String[] values)Writes the next STRING type multi-value into the forward index.
-
-
-
Method Detail
-
isDictionaryEncoded
boolean isDictionaryEncoded()
Returnstrueif the forward index is dictionary-encoded,falseif it is raw.
-
isSingleValue
boolean isSingleValue()
Returnstrueif the forward index is for a single-value column,falseif it is for a multi-value column.
-
getValueType
FieldSpec.DataType getValueType()
Returns the data type of the values in the forward index. ReturnsFieldSpec.DataType.INTfor dictionary-encoded forward index.
-
putDictId
default void putDictId(int dictId)
Writes the dictionary id for the next single-value into the forward index.- Parameters:
dictId- Document id to write
-
putDictIdMV
default void putDictIdMV(int[] dictIds)
Writes the dictionary ids for the next multi-value into the forward index.- Parameters:
dictIds- Document ids to write
-
putInt
default void putInt(int value)
Writes the next INT type single-value into the forward index.- Parameters:
value- Value to write
-
putLong
default void putLong(long value)
Writes the next LONG type single-value into the forward index.- Parameters:
value- Value to write
-
putFloat
default void putFloat(float value)
Writes the next FLOAT type single-value into the forward index.- Parameters:
value- Value to write
-
putDouble
default void putDouble(double value)
Writes the next DOUBLE type single-value into the forward index.- Parameters:
value- Value to write
-
putBigDecimal
default void putBigDecimal(BigDecimal value)
Writes the next BIG_DECIMAL type single-value into the forward index.- Parameters:
value- Value to write
-
putString
default void putString(String value)
Writes the next STRING type single-value into the forward index.- Parameters:
value- Value to write
-
putBytes
default void putBytes(byte[] value)
Writes the next BYTES type single-value into the forward index.- Parameters:
value- Value to write
-
putIntMV
default void putIntMV(int[] values)
Writes the next INT type multi-value into the forward index.- Parameters:
values- Values to write
-
putLongMV
default void putLongMV(long[] values)
Writes the next LONG type multi-value into the forward index.- Parameters:
values- Values to write
-
putFloatMV
default void putFloatMV(float[] values)
Writes the next FLOAT type multi-value into the forward index.- Parameters:
values- Values to write
-
putDoubleMV
default void putDoubleMV(double[] values)
Writes the next DOUBLE type multi-value into the forward index.- Parameters:
values- Values to write
-
putStringMV
default void putStringMV(String[] values)
Writes the next STRING type multi-value into the forward index.- Parameters:
values- Values to write
-
putBytesMV
default void putBytesMV(byte[][] values)
Writes the next byte[] type multi-value into the forward index.- Parameters:
values- Values to write
-
-