Module org.elasticsearch.server
Enum Class DenseVectorFieldMapper.ElementType
java.lang.Object
java.lang.Enum<DenseVectorFieldMapper.ElementType>
org.elasticsearch.index.mapper.vectors.DenseVectorFieldMapper.ElementType
- All Implemented Interfaces:
Serializable,Comparable<DenseVectorFieldMapper.ElementType>,Constable
- Enclosing class:
DenseVectorFieldMapper
public static enum DenseVectorFieldMapper.ElementType
extends Enum<DenseVectorFieldMapper.ElementType>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckDimensions(Integer dvDims, int qvDims) abstract voidcheckVectorBounds(float[] vector) abstract doublecomputeSquaredMagnitude(VectorData vectorData) abstract ByteBuffercreateByteBuffer(IndexVersion indexVersion, int numBytes) fromString(String name) abstract intgetNumBytes(int dimensions) intparseDimensionCount(DocumentParserContext context) abstract VectorDataparseKnnVector(DocumentParserContext context, int dims, DenseVectorFieldMapper.IntBooleanConsumer dimChecker, DenseVectorFieldMapper.VectorSimilarity similarity) abstract voidreadAndWriteValue(ByteBuffer byteBuffer, XContentBuilder b) Returns the enum constant of this class with the specified name.static DenseVectorFieldMapper.ElementType[]values()Returns an array containing the constants of this enum class, in the order they are declared.abstract voidwriteValue(ByteBuffer byteBuffer, float value)
-
Enum Constant Details
-
BYTE
-
FLOAT
-
BIT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
writeValue
-
readAndWriteValue
- Throws:
IOException
-
parseKnnVector
public abstract VectorData parseKnnVector(DocumentParserContext context, int dims, DenseVectorFieldMapper.IntBooleanConsumer dimChecker, DenseVectorFieldMapper.VectorSimilarity similarity) throws IOException - Throws:
IOException
-
getNumBytes
public abstract int getNumBytes(int dimensions) -
createByteBuffer
-
checkVectorBounds
public abstract void checkVectorBounds(float[] vector) -
checkDimensions
-
parseDimensionCount
- Throws:
IOException
-
computeSquaredMagnitude
-
fromString
-