优化代码

This commit is contained in:
xgc 2024-06-03 09:25:42 +08:00
parent ea99b5b20e
commit aa3659e63f

View File

@ -187,10 +187,8 @@ public class MilvusConverter {
schemaBuilder.addField(milvusEntity.getMilvusFields().toArray(new AddFieldReq[0]));
log.info("-------create schema---------");
schemaBuilder.createSchema();
if (indexParams != null && !indexParams.isEmpty()) {
schemaBuilder.createIndex(indexParams);
log.info("-------create index---------");
}
schemaBuilder.createIndex(indexParams);
log.info("-------create index---------");
// 创建分区
List<String> partitionName = milvusEntity.getPartitionName();
if (CollectionUtils.isEmpty(partitionName)) {