FieldType
A FieldType instance enumerates supported Milvus field data types and provides helpers for identifying vector types.
IsVectorType() returns true for binary, float, float16, bfloat16, sparse, and int8 vector field types.
FieldTypeText is a variable-length string type that does not require a max_length.
type FieldType int32
VALUES:
-
FieldTypeNone =
0zero value place holder.
-
FieldTypeBool =
1 -
FieldTypeInt8 =
2 -
FieldTypeInt16 =
3 -
FieldTypeInt32 =
4 -
FieldTypeInt64 =
5 -
FieldTypeFloat =
10 -
FieldTypeDouble =
11 -
FieldTypeString =
20 -
FieldTypeVarChar =
21variable-length strings with a specified maximum length.
-
FieldTypeArray =
22 -
FieldTypeJSON =
23 -
FieldTypeGeometry =
24 -
FieldTypeText =
25variable-length strings without a required max_length.
-
FieldTypeTimestamptz =
26 -
FieldTypeBinaryVector =
100 -
FieldTypeFloatVector =
101 -
FieldTypeFloat16Vector =
102 -
FieldTypeBFloat16Vector =
103 -
FieldTypeSparseVector =
104 -
FieldTypeInt8Vector =
105 -
FieldTypeStruct =
201
Example
Demonstrates FieldType usage.
import (
"fmt"
"github.com/milvus-io/milvus/client/v3/entity"
)
fieldType := entity.FieldTypeFloatVector
fmt.Println(fieldType.Name())
fmt.Println(fieldType.IsVectorType())