Skip to content

Commit

Permalink
Prepare for v2.5.1 (#1215)
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <yihua.mo@zilliz.com>
  • Loading branch information
yhmo authored Dec 4, 2024
1 parent 11d828b commit 00c4c10
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -33,20 +33,20 @@ You can use **Apache Maven** or **Gradle** add Milvus SDK to your project.
<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>
</dependency>
```

- 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
Expand Down
12 changes: 5 additions & 7 deletions examples/main/java/io/milvus/v2/BulkWriterExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<List<String>> batchFiles, String collectionName, String partitionName) throws InterruptedException {
Expand Down Expand Up @@ -589,8 +587,6 @@ private void callCloudImport(List<List<String>> 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());
}

/**
Expand All @@ -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);
}

Expand Down Expand Up @@ -695,6 +691,7 @@ private void createIndex() {
.build());

milvusClient.createIndex(CreateIndexReq.builder()
.collectionName(ALL_TYPES_COLLECTION_NAME)
.indexParams(indexes)
.build());
}
Expand All @@ -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<QueryResp.QueryResult> query(String expr, List<String> outputFields) {
Expand All @@ -719,8 +717,8 @@ private List<QueryResp.QueryResult> query(String expr, List<String> 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
Expand Down
4 changes: 2 additions & 2 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java-examples</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>

<build>
<plugins>
Expand Down Expand Up @@ -64,7 +64,7 @@
<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>
<packaging>jar</packaging>

<name>io.milvus:milvus-sdk-java</name>
Expand Down

0 comments on commit 00c4c10

Please sign in to comment.