addField()
This operation adds a sub-field to a struct field schema. Use this to define the inner fields of a struct-type column.
public StructFieldSchema addField(AddFieldReq addFieldReq)
PARAMETERS:
addFieldReq (AddFieldReq) -
An AddFieldReq object defining the sub-field properties.
RETURNS:
EXCEPTIONS:
MilvusClientException
This exception will be raised when any error occurs during this operation.
Example
CreateCollectionReq.StructFieldSchema structField = CreateCollectionReq.StructFieldSchema.builder()
.name("metadata")
.build();
structField.addField(AddFieldReq.builder()
.fieldName("key")
.dataType(DataType.VarChar)
.maxLength(128)
.build());