diff --git a/src/main/java/io/milvus/client/AbstractMilvusGrpcClient.java b/src/main/java/io/milvus/client/AbstractMilvusGrpcClient.java index 34e28af1a..e5920a0da 100644 --- a/src/main/java/io/milvus/client/AbstractMilvusGrpcClient.java +++ b/src/main/java/io/milvus/client/AbstractMilvusGrpcClient.java @@ -3076,6 +3076,7 @@ public R delete(DeleteIdsParam requestParam) { String expr = VectorUtils.convertPksExpr(requestParam.getPrimaryIds(), wrapper); DeleteParam deleteParam = DeleteParam.newBuilder() .withCollectionName(requestParam.getCollectionName()) + .withPartitionName(requestParam.getPartitionName()) .withExpr(expr) .build(); R resultR = delete(deleteParam); diff --git a/src/main/java/io/milvus/param/highlevel/dml/DeleteIdsParam.java b/src/main/java/io/milvus/param/highlevel/dml/DeleteIdsParam.java index ff9cb9481..3d7c824fa 100644 --- a/src/main/java/io/milvus/param/highlevel/dml/DeleteIdsParam.java +++ b/src/main/java/io/milvus/param/highlevel/dml/DeleteIdsParam.java @@ -36,12 +36,13 @@ @Getter @ToString public class DeleteIdsParam { - private final String collectionName; + private final String partitionName; private final List primaryIds; private DeleteIdsParam(@NonNull Builder builder) { this.collectionName = builder.collectionName; + this.partitionName = builder.partitionName; this.primaryIds = builder.primaryIds; } @@ -54,6 +55,7 @@ public static Builder newBuilder() { */ public static class Builder { private String collectionName; + private String partitionName = ""; private List primaryIds = new ArrayList<>(); private Builder() { @@ -70,6 +72,17 @@ public Builder withCollectionName(@NonNull String collectionName) { return this; } + /** + * Sets the partition name (Optional). + * + * @param partitionName partition name + * @return Builder + */ + public Builder withPartitionName(@NonNull String partitionName) { + this.partitionName = partitionName; + return this; + } + /** * Specifies primaryId fields. PrimaryIds cannot be empty or null. *