Modifier and Type | Method and Description |
---|---|
FieldType.Builder |
addTypeParam(@NonNull java.lang.String key,
@NonNull java.lang.String value)
Adds a parameter pair for the field.
|
FieldType |
build()
Verifies parameters and creates a new
FieldType instance. |
FieldType.Builder |
withAutoID(boolean autoID)
Enables auto-id function for the field.
|
FieldType.Builder |
withDataType(@NonNull io.milvus.grpc.DataType dataType)
Sets the data type for the field.
|
FieldType.Builder |
withDescription(@NonNull java.lang.String description)
Sets the field description.
|
FieldType.Builder |
withDimension(@NonNull java.lang.Integer dimension)
Sets the dimension of a vector field.
|
FieldType.Builder |
withElementType(@NonNull io.milvus.grpc.DataType elementType)
Sets the element type for Array type field.
|
FieldType.Builder |
withIsDynamic(boolean isDynamic)
Sets the isDynamic of a field.
|
FieldType.Builder |
withMaxCapacity(@NonNull java.lang.Integer maxCapacity)
Sets the max capacity of an array field.
|
FieldType.Builder |
withMaxLength(@NonNull java.lang.Integer maxLength)
Sets the max length of a varchar field.
|
FieldType.Builder |
withName(@NonNull java.lang.String name) |
FieldType.Builder |
withPartitionKey(boolean partitionKey)
Sets the field to be partition key.
|
FieldType.Builder |
withPrimaryKey(boolean primaryKey)
Sets the field as the primary key field.
|
FieldType.Builder |
withTypeParams(@NonNull java.util.Map<java.lang.String,java.lang.String> typeParams)
Sets more parameters for the field.
|
public FieldType.Builder withName(@NonNull @NonNull java.lang.String name)
public FieldType.Builder withIsDynamic(boolean isDynamic)
isDynamic
- of a fieldBuilder
public FieldType.Builder withPrimaryKey(boolean primaryKey)
Long
data type as primary key.primaryKey
- true is primary key, false is notBuilder
public FieldType.Builder withDescription(@NonNull @NonNull java.lang.String description)
description
- description of the fieldBuilder
public FieldType.Builder withDataType(@NonNull @NonNull io.milvus.grpc.DataType dataType)
dataType
- data type of the fieldBuilder
public FieldType.Builder withElementType(@NonNull @NonNull io.milvus.grpc.DataType elementType)
elementType
- element type of the Array type fieldBuilder
public FieldType.Builder addTypeParam(@NonNull @NonNull java.lang.String key, @NonNull @NonNull java.lang.String value)
key
- parameter keyvalue
- parameter valueBuilder
public FieldType.Builder withTypeParams(@NonNull @NonNull java.util.Map<java.lang.String,java.lang.String> typeParams)
typeParams
- parameters of the fieldBuilder
public FieldType.Builder withDimension(@NonNull @NonNull java.lang.Integer dimension)
dimension
- dimension of the fieldBuilder
public FieldType.Builder withMaxLength(@NonNull @NonNull java.lang.Integer maxLength)
maxLength
- max length of a varchar fieldBuilder
public FieldType.Builder withMaxCapacity(@NonNull @NonNull java.lang.Integer maxCapacity)
maxCapacity
- max capacity of an array fieldBuilder
public FieldType.Builder withAutoID(boolean autoID)
autoID
- true enable auto-id, false disable auto-idBuilder
public FieldType.Builder withPartitionKey(boolean partitionKey)
partitionKey
- true is partition key, false is notBuilder
public FieldType build() throws ParamException
FieldType
instance.FieldType
ParamException