メインコンテンツまでスキップ

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() int

    Returns the dimensionality of the vector.

  • Serialize() []byte

    Serializes the vector data to bytes.

  • FieldType() FieldType

    Returns the FieldType enum value for this vector type.

Example

// Vector is typically obtained from API calls or constructors
// TODO: Usage example