Skip to content

Commit a990cfb

Browse files
committed
2.4.2
1 parent 712954a commit a990cfb

6 files changed

Lines changed: 41 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ You can use **Apache Maven** or **Gradle**/**Grails** to download the SDK.
2424
<dependency>
2525
<groupId>com.tencent.tcvectordb</groupId>
2626
<artifactId>vectordatabase-sdk-java</artifactId>
27-
<version>2.4.1</version>
27+
<version>2.4.2</version>
2828
</dependency>
2929
```
3030

3131
- Gradle/Grails
3232

3333
```gradle
34-
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.4.1'
34+
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.4.2'
3535
```
3636

3737
### Examples

tcvectordb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ You can use **Apache Maven** or **Gradle**/**Grails** to download the SDK.
2424
<dependency>
2525
<groupId>com.tencent.tcvectordb</groupId>
2626
<artifactId>vectordatabase-sdk-java</artifactId>
27-
<version>2.4.1</version>
27+
<version>2.4.2</version>
2828
</dependency>
2929
```
3030

3131
- Gradle/Grails
3232

3333
```gradle
34-
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.4.1'
34+
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.4.2'
3535
```
3636

3737
### Examples

tcvectordb/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.tencent.tcvectordb</groupId>
66
<artifactId>vectordatabase-sdk-java</artifactId>
7-
<version>2.4.1</version>
7+
<version>2.4.2</version>
88
<packaging>jar</packaging>
99

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

tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithAI_doc.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ private static CreateCollectionViewParam initCreateCollectionViewParam(String co
277277
.withEmbedding(EmbeddingParams.newBuilder().withEnableWordEmbedding(true).withLanguage(LanguageType.ZH).Build())
278278
.withAverageFileSize(204800)
279279
.withExpectedFileNum(10240)
280+
.withReplicaNum(1)
281+
.withShardNum(2)
280282
.addField(new FilterIndex("author", FieldType.String, IndexType.FILTER))
281283
.addField(new FilterIndex("tags", FieldType.Array, IndexType.FILTER))
282284
.withSplitterPreprocess(SplitterPreprocessParams.newBuilder().

tcvectordb/src/main/java/com/tencent/tcvectordb/model/CollectionView.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public class CollectionView {
8181
@JsonIgnore
8282
private String connectCollectionName;
8383

84+
protected Integer replicaNum;
85+
protected Integer shardNum;
86+
8487
public void setConnectCollectionName(String connectCollectionName) {
8588
this.connectCollectionName = connectCollectionName;
8689
}
@@ -178,6 +181,22 @@ public void setParsingProcess(ParsingProcessParam parsingProcess) {
178181
this.parsingProcess = parsingProcess;
179182
}
180183

184+
public Integer getReplicaNum() {
185+
return replicaNum;
186+
}
187+
188+
public void setReplicaNum(Integer replicaNum) {
189+
this.replicaNum = replicaNum;
190+
}
191+
192+
public Integer getShardNum() {
193+
return shardNum;
194+
}
195+
196+
public void setShardNum(Integer shardNum) {
197+
this.shardNum = shardNum;
198+
}
199+
181200
public CollectionView() {
182201
}
183202

tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collectionView/CreateCollectionViewParam.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ private CreateCollectionViewParam(Builder builder) {
4444
this.expectedFileNum = builder.expectedFileNum;
4545
this.averageFileSize = builder.averageFileSize;
4646
this.parsingProcess = builder.parsingProcess;
47+
this.replicaNum = builder.replicaNum;
48+
this.shardNum = builder.shardNum;
4749
}
4850
public SplitterPreprocessParams getSplitterPreprocess() {
4951
return splitterPreprocess;
@@ -63,6 +65,9 @@ public static class Builder {
6365
private Integer expectedFileNum;
6466
private Integer averageFileSize;
6567

68+
private Integer replicaNum;
69+
private Integer shardNum;
70+
6671
private ParsingProcessParam parsingProcess;
6772

6873
private Builder() {
@@ -108,6 +113,16 @@ public Builder withParsingProcess(ParsingProcessParam parsingProcess) {
108113
return this;
109114
}
110115

116+
public Builder withReplicaNum(Integer replicaNum) {
117+
this.replicaNum = replicaNum;
118+
return this;
119+
}
120+
121+
public Builder withShardNum(Integer shardNum) {
122+
this.shardNum = shardNum;
123+
return this;
124+
}
125+
111126
public CreateCollectionViewParam build() throws ParamException {
112127
if (StringUtils.isEmpty(this.name)) {
113128
throw new ParamException("CreateCollectionViewParam error: name is null");

0 commit comments

Comments
 (0)