Skip to content

Commit

Permalink
2.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
anyihao committed Dec 3, 2024
1 parent 92e324f commit c119c83
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ You can use **Apache Maven** or **Gradle**/**Grails** to download the SDK.
<dependency>
<groupId>com.tencent.tcvectordb</groupId>
<artifactId>vectordatabase-sdk-java</artifactId>
<version>2.0.15</version>
<version>2.0.16</version>
</dependency>
```

- Gradle/Grails

```gradle
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.0.15'
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.0.16'
```

### Examples
Expand Down
4 changes: 2 additions & 2 deletions tcvectordb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ You can use **Apache Maven** or **Gradle**/**Grails** to download the SDK.
<dependency>
<groupId>com.tencent.tcvectordb</groupId>
<artifactId>vectordatabase-sdk-java</artifactId>
<version>2.0.15</version>
<version>2.0.16</version>
</dependency>
```

- Gradle/Grails

```gradle
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.0.15'
compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.0.16'
```

### Examples
Expand Down
2 changes: 1 addition & 1 deletion tcvectordb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.tencent.tcvectordb</groupId>
<artifactId>vectordatabase-sdk-java</artifactId>
<version>2.0.15</version>
<version>2.0.16</version>
<packaging>jar</packaging>

<name>vectordatabase-sdk-java</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.tencent.tcvectordb.exception.VectorDBException;
import com.tencent.tcvectordb.model.param.collectionView.ParsingProcessParam;
import com.tencent.tcvectordb.model.param.collectionView.SplitterPreprocessParams;
import com.tencent.tcvectordb.model.param.dml.CollectionViewConditionParam;
import com.tencent.tcvectordb.model.param.dml.SearchByContentsParam;
Expand Down Expand Up @@ -60,6 +61,15 @@ public class DocumentSet {
private List<DocField> docFields;
private Map<String, Object> docKeyValue;
private SplitterPreprocessParams splitterPreprocess;
private ParsingProcessParam parsingProcess;

public ParsingProcessParam getParsingProcess() {
return parsingProcess;
}

public void setParsingProcess(ParsingProcessParam parsingProcess) {
this.parsingProcess = parsingProcess;
}

public SplitterPreprocessParams getSplitterPreprocess() {
return splitterPreprocess;
Expand Down Expand Up @@ -215,6 +225,9 @@ public String toString() {
if (splitterPreprocess!=null) {
node.put("splitterPreprocess", JsonUtils.toJsonString(splitterPreprocess));
}
if (parsingProcess!=null) {
node.put("parsingProcess", JsonUtils.toJsonString(parsingProcess));
}

if (docFields != null && !docFields.isEmpty()) {
for (DocField field : docFields) {
Expand Down Expand Up @@ -242,6 +255,7 @@ private DocumentSet(Builder builder) {
this.documentSetId = builder.documentSetId;
this.textPrefix = builder.textPrefix;
this.splitterPreprocess = builder.splitterPreprocess;
this.parsingProcess = builder.parsingProcessParam;
}

public static Builder newBuilder() {
Expand All @@ -255,6 +269,7 @@ public static class Builder {
private DocumentSetInfo documentSetInfo;
private List<DocField> docFields;
private SplitterPreprocessParams splitterPreprocess;
private ParsingProcessParam parsingProcessParam;

public Builder() {
this.docFields = new ArrayList<>();
Expand Down Expand Up @@ -285,6 +300,11 @@ public Builder withSplitProcess(SplitterPreprocessParams splitterPreprocess) {
return this;
}

public Builder withParsingProcess(ParsingProcessParam parsingProcess) {
this.parsingProcessParam = parsingProcess;
return this;
}

/**
* This is a deprecated method.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
import com.tencent.tcvectordb.model.Collection;
import com.tencent.tcvectordb.model.*;
import com.tencent.tcvectordb.model.param.collection.CreateCollectionParam;
import com.tencent.tcvectordb.model.param.collectionView.CreateCollectionViewParam;
import com.tencent.tcvectordb.model.param.collectionView.FileType;
import com.tencent.tcvectordb.model.param.collectionView.LoadAndSplitTextParam;
import com.tencent.tcvectordb.model.param.collectionView.SplitterPreprocessParams;
import com.tencent.tcvectordb.model.param.collectionView.*;
import com.tencent.tcvectordb.model.param.database.ConnectParam;
import com.tencent.tcvectordb.model.param.entity.*;
import com.tencent.tcvectordb.model.param.enums.DataBaseTypeEnum;
Expand Down Expand Up @@ -890,6 +887,9 @@ private DocumentSet node2DocmentSet(JsonNode node) throws JsonProcessingExceptio
} else if (StringUtils.equals("splitterPreprocess", name)) {
SplitterPreprocessParams splitterPreprocess = JsonUtils.parseObject(ele.toString(), SplitterPreprocessParams.class);
builder.withSplitProcess(splitterPreprocess);
}else if (StringUtils.equals("parsingProcess", name)) {
ParsingProcessParam parsingProcessParam = JsonUtils.parseObject(ele.toString(), ParsingProcessParam.class);
builder.withParsingProcess(parsingProcessParam);
} else {
if (ele.isInt()) {
builder.addFilterField(new DocField(name, ele.asInt()));
Expand Down

0 comments on commit c119c83

Please sign in to comment.