diff --git a/sdk-core/src/main/java/io/milvus/v2/service/collection/response/DescribeCollectionResp.java b/sdk-core/src/main/java/io/milvus/v2/service/collection/response/DescribeCollectionResp.java index 2f0ea8478..fb6d71ee8 100644 --- a/sdk-core/src/main/java/io/milvus/v2/service/collection/response/DescribeCollectionResp.java +++ b/sdk-core/src/main/java/io/milvus/v2/service/collection/response/DescribeCollectionResp.java @@ -46,6 +46,7 @@ public class DescribeCollectionResp { private CreateCollectionReq.CollectionSchema collectionSchema; private Long createTime; private ConsistencyLevel consistencyLevel; + private Integer shardsNum; @Builder.Default private final Map properties = new HashMap<>(); } diff --git a/sdk-core/src/main/java/io/milvus/v2/utils/ConvertUtils.java b/sdk-core/src/main/java/io/milvus/v2/utils/ConvertUtils.java index 13c0d70ac..bd986403e 100644 --- a/sdk-core/src/main/java/io/milvus/v2/utils/ConvertUtils.java +++ b/sdk-core/src/main/java/io/milvus/v2/utils/ConvertUtils.java @@ -140,6 +140,7 @@ public DescribeCollectionResp convertDescCollectionResp(DescribeCollectionRespon .primaryFieldName(response.getSchema().getFieldsList().stream().filter(FieldSchema::getIsPrimaryKey).map(FieldSchema::getName).collect(java.util.stream.Collectors.toList()).get(0)) .createTime(response.getCreatedTimestamp()) .consistencyLevel(io.milvus.v2.common.ConsistencyLevel.valueOf(response.getConsistencyLevel().name().toUpperCase())) + .shardsNum(response.getShardsNum()) .properties(properties) .build(); return describeCollectionResp;