Package io.milvus.client
Class InsertParam.Builder
- java.lang.Object
-
- io.milvus.client.InsertParam.Builder
-
- Enclosing class:
- InsertParam
public static class InsertParam.Builder extends java.lang.Object
Builder forInsertParam
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String collectionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InsertParam
build()
InsertParam.Builder
withBinaryVectors(java.util.List<java.nio.ByteBuffer> binaryVectors)
Default to an emptyArrayList
.InsertParam.Builder
withFloatVectors(java.util.List<java.util.List<java.lang.Float>> floatVectors)
Default to an emptyArrayList
.InsertParam.Builder
withPartitionTag(java.lang.String partitionTag)
Optional.InsertParam.Builder
withVectorIds(java.util.List<java.lang.Long> vectorIds)
Optional.
-
-
-
Method Detail
-
withFloatVectors
public InsertParam.Builder withFloatVectors(@Nonnull java.util.List<java.util.List<java.lang.Float>> floatVectors)
Default to an emptyArrayList
. You can only insert either float or binary vectors to a collection, not both.- Parameters:
floatVectors
- aList
of float vectors to insert. Each innerList
represents a float vector.- Returns:
Builder
-
withBinaryVectors
public InsertParam.Builder withBinaryVectors(@Nonnull java.util.List<java.nio.ByteBuffer> binaryVectors)
Default to an emptyArrayList
. You can only insert either float or binary vectors to a collection, not both.- Parameters:
binaryVectors
- aList
of binary vectors to insert. EachByteBuffer
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 emptyArrayList
- Parameters:
vectorIds
- aList
of ids associated with the vectors to insert- Returns:
Builder
-
withPartitionTag
public InsertParam.Builder withPartitionTag(@Nonnull java.lang.String partitionTag)
Optional. Default to an emptyString
- Parameters:
partitionTag
- partition tag- Returns:
Builder
-
build
public InsertParam build()
-
-