Vector
Addedv2.6.x
Interface for vector data. Implementations include FloatVector, BinaryVector, Float16Vector, BFloat16Vector, Int8Vector, and Text.
type Vector interface {
Dim() int
Serialize() []byte
FieldType() FieldType
}
METHODS:
-
Dim() intReturns the dimensionality of the vector.
-
Serialize() []byteSerializes the vector data to bytes.
-
FieldType() FieldTypeReturns the FieldType enum value for this vector type.
Example
// Vector is typically obtained from API calls or constructors
// TODO: Usage example