milvus-logo
Star
0
Forks
0
快速开始

Class CreateCollectionParam.Builder

  • java.lang.Object
    • io.milvus.param.collection.CreateCollectionParam.Builder
    • Method Detail

      • withCollectionName

        public CreateCollectionParam.Builder withCollectionName​(@NonNull
                                                                @NonNull java.lang.String collectionName)
        Sets the collection name. Collection name cannot be empty or null.
        Parameters:
        collectionName - collection name
        Returns:
        Builder
      • withShardsNum

        public CreateCollectionParam.Builder withShardsNum​(int shardsNum)
        Sets the shards number. The number must be greater than zero. The default value is 2.
        Parameters:
        shardsNum - shards number to distribute insert data into multiple data nodes and query nodes.
        Returns:
        Builder
      • withDescription

        public CreateCollectionParam.Builder withDescription​(@NonNull
                                                             @NonNull java.lang.String description)
        Sets the collection description. The description can be empty. The default is "".
        Parameters:
        description - description of the collection
        Returns:
        Builder
      • withFieldTypes

        public CreateCollectionParam.Builder withFieldTypes​(@NonNull
                                                            @NonNull java.util.List<FieldType> fieldTypes)
        Sets the schema of the collection. The schema cannot be empty or null.
        Parameters:
        fieldTypes - a List of FieldType
        Returns:
        Builder
        See Also:
        FieldType
      • addFieldType

        public CreateCollectionParam.Builder addFieldType​(@NonNull
                                                          @NonNull FieldType fieldType)
        Adds a field schema.
        Parameters:
        fieldType - a FieldType object
        Returns:
        Builder
        See Also:
        FieldType