From 0a468b873c5319f793fe52816a8207e9a326e76c Mon Sep 17 00:00:00 2001 From: yhmo Date: Wed, 4 Dec 2024 12:31:43 +0800 Subject: [PATCH] Prepare for v2.5.1 Signed-off-by: yhmo --- CHANGELOG.md | 7 +++++++ README.md | 8 ++++---- .../main/java/io/milvus/v2/BulkWriterExample.java | 12 +++++------- examples/pom.xml | 4 ++-- pom.xml | 2 +- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 687d90875..2c81ed427 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## milvus-sdk-java 2.5.1 (2024-12-04) +### Improvement +- Support upsert items with auto-id primary key + +### Bug +- Critical: Fix a bug that dynamic values are skipped with enableDynamicField is true + ## milvus-sdk-java 2.5.0 (2024-11-26) ### Feature - BulkWriter supports JSON/CSV format diff --git a/README.md b/README.md index 5589565ab..5045f3775 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The following table shows compatibilities between Milvus and Java SDK. | >= 2.2.9 | 2.2.7 ~ 2.2.15 | | 2.3.x | 2.3.11 | | 2.4.x | 2.4.8 | -| 2.5.x | 2.5.0 | +| 2.5.x | 2.5.1 | ### Install Java SDK @@ -33,20 +33,20 @@ You can use **Apache Maven** or **Gradle** add Milvus SDK to your project. io.milvus milvus-sdk-java - 2.5.0 + 2.5.1 ``` - Gradle/Groovy ```groovy - implementation 'io.milvus:milvus-sdk-java:2.5.0' + implementation 'io.milvus:milvus-sdk-java:2.5.1' ``` - Gradle/Kotlin ```kotlin - implementation("io.milvus:milvus-sdk-java:2.5.0") + implementation("io.milvus:milvus-sdk-java:2.5.1") ``` ### Examples diff --git a/examples/main/java/io/milvus/v2/BulkWriterExample.java b/examples/main/java/io/milvus/v2/BulkWriterExample.java index 9171bff49..04b65e9df 100644 --- a/examples/main/java/io/milvus/v2/BulkWriterExample.java +++ b/examples/main/java/io/milvus/v2/BulkWriterExample.java @@ -540,8 +540,6 @@ private void callBulkInsert(CreateCollectionReq.CollectionSchema collectionSchem System.out.printf("The job %s is running, state:%s progress:%s%n", jobId, state, progress); } } - - System.out.println("Collection row number: " + getCollectionStatistics()); } private void callCloudImport(List> batchFiles, String collectionName, String partitionName) throws InterruptedException { @@ -589,8 +587,6 @@ private void callCloudImport(List> batchFiles, String collectionNam System.out.printf("The job %s is running, state:%s progress:%s%n", jobId, importProgressState, progress); } } - - System.out.println("Collection row number: " + getCollectionStatistics()); } /** @@ -616,7 +612,7 @@ private void createCollection(String collectionName, CreateCollectionReq.Collect } else { milvusClient.createCollection(requestCreate); } - +// milvusClient.loadCollection(LoadCollectionReq.builder().collectionName(collectionName).build()); System.out.printf("Collection %s created%n", collectionName); } @@ -695,6 +691,7 @@ private void createIndex() { .build()); milvusClient.createIndex(CreateIndexReq.builder() + .collectionName(ALL_TYPES_COLLECTION_NAME) .indexParams(indexes) .build()); } @@ -705,6 +702,7 @@ private void loadCollection() { milvusClient.loadCollection(LoadCollectionReq.builder() .collectionName(ALL_TYPES_COLLECTION_NAME) .build()); + System.out.println("Collection row number: " + getCollectionRowCount()); } private List query(String expr, List outputFields) { @@ -719,8 +717,8 @@ private List query(String expr, List outputFields return response.getQueryResults(); } - private Long getCollectionStatistics() { - System.out.println("========== getCollectionStatistics() =========="); + private Long getCollectionRowCount() { + System.out.println("========== getCollectionRowCount() =========="); checkMilvusClientIfExist(); // Get row count, set ConsistencyLevel.STRONG to sync the data to query node so that data is visible diff --git a/examples/pom.xml b/examples/pom.xml index 3e3f64257..aa7183f8c 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -25,7 +25,7 @@ io.milvus milvus-sdk-java-examples - 2.5.0 + 2.5.1 @@ -64,7 +64,7 @@ io.milvus milvus-sdk-java - 2.5.0 + 2.5.1 org.tensorflow diff --git a/pom.xml b/pom.xml index 239f56955..eb7a349d5 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ io.milvus milvus-sdk-java - 2.5.0 + 2.5.1 jar io.milvus:milvus-sdk-java