milvus-logo
LFAI
< Docs
  • Java
    • v2

getField()

This operation gets the details of a specific field, including schema information.

public CreateCollectionReq.FieldSchema getField(String fieldName)

Request Syntax

CollectionSchema.getField(String fieldName)

PARAMETERS:

  • fieldName (String)

    The name of the field.

RETURN TYPE:

CreateCollectionReq.FieldSchema

RETURNS:

A FieldSchema object containing details of the field.

EXCEPTIONS:

  • MilvusClientExceptions

    This exception will be raised when any error occurs during this operation.

Example

CreateCollectionReq.FieldSchema fieldSchema = collectionSchema.getField("id");