Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public Void createCollectionWithSchema(MilvusServiceGrpc.MilvusServiceBlockingSt
CreateCollectionRequest.Builder builder = CreateCollectionRequest.newBuilder()
.setCollectionName(request.getCollectionName())
.setSchema(grpcSchema.toByteString())
.setShardsNum(request.getNumShards());
.setShardsNum(request.getNumShards())
.setConsistencyLevelValue(request.getConsistencyLevel().getCode());
List<KeyValuePair> propertiesList = ParamUtils.AssembleKvPair(request.getProperties());
if (CollectionUtils.isNotEmpty(propertiesList)) {
propertiesList.forEach(builder::addProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> properties = new HashMap<>();
}
1 change: 1 addition & 0 deletions src/main/java/io/milvus/v2/utils/ConvertUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,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;
Expand Down
Loading