Class InsertParam.Builder

  • Enclosing class:
    InsertParam

    public static class InsertParam.Builder
    extends java.lang.Object
    Builder for InsertParam
    • Constructor Detail

      • Builder

        public Builder​(@Nonnull
                       java.lang.String collectionName)
        Parameters:
        collectionName - collection to insert vectors to
    • Method Detail

      • withFloatVectors

        public InsertParam.Builder withFloatVectors​(@Nonnull
                                                    java.util.List<java.util.List<java.lang.Float>> floatVectors)
        Default to an empty ArrayList. You can only insert either float or binary vectors to a collection, not both.
        Parameters:
        floatVectors - a List of float vectors to insert. Each inner List represents a float vector.
        Returns:
        Builder
      • withBinaryVectors

        public InsertParam.Builder withBinaryVectors​(@Nonnull
                                                     java.util.List<java.nio.ByteBuffer> binaryVectors)
        Default to an empty ArrayList. You can only insert either float or binary vectors to a collection, not both.
        Parameters:
        binaryVectors - a List of binary vectors to insert. Each ByteBuffer object represents a binary vector, with every 8 bits constituting a byte.
        Returns:
        Builder
        See Also:
        ByteBuffer
      • withVectorIds

        public InsertParam.Builder withVectorIds​(@Nonnull
                                                 java.util.List<java.lang.Long> vectorIds)
        Optional. Default to an empty ArrayList
        Parameters:
        vectorIds - a List of ids associated with the vectors to insert
        Returns:
        Builder
      • withPartitionTag

        public InsertParam.Builder withPartitionTag​(@Nonnull
                                                    java.lang.String partitionTag)
        Optional. Default to an empty String
        Parameters:
        partitionTag - partition tag
        Returns:
        Builder