Skip to content

Commit 588ff6c

Browse files
author
liyan.90210
committed
feat auto update sdk
1 parent 33a4307 commit 588ff6c

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Change log
22

3+
2025-12-23 Bumped to version v1.0.254
4+
- Updated apis for vikingDB
5+
36
2025-12-22 Bumped to version v1.0.253
47
- Updated apis for tls
58

volc-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.volcengine</groupId>
7-
<version>1.0.253</version>
7+
<version>1.0.254</version>
88
<artifactId>volc-sdk-java</artifactId>
99

1010
<name>volc-sdk-java</name>

volc-sdk-java/src/main/java/com/volcengine/service/vikingDB/common/VectorIndexParams.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
package com.volcengine.service.vikingDB.common;
22

3+
import com.google.common.base.Strings;
4+
import com.volcengine.service.vikingDB.VikingDBException;
35
import lombok.Data;
46

57
import java.util.HashMap;
68
import java.util.Map;
79

810
@Data
911
public class VectorIndexParams {
10-
private String indexType = DistanceType.IP;
12+
private String indexType;
1113
private String distance = IndexType.HNSW;
1214
private String quant = QuantType.Int8;
1315
private Integer hnswM = 20;
1416
private Integer hnswCef = 400;
1517
private Integer hnswSef = 800;
1618

17-
public Map<String, Object> dict() {
19+
public Map<String, Object> dict() throws VikingDBException {
20+
if (Strings.isNullOrEmpty(distance)) {
21+
throw new VikingDBException(1000003, "", "Index distance can not be empty.");
22+
}
1823
Map<String, Object> map = new HashMap<>();
1924
map.put("distance", distance);
2025
map.put("index_type", indexType);

0 commit comments

Comments
 (0)