diff --git a/README.md b/README.md index a86ad1c..1c38913 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,14 @@ You can use **Apache Maven** or **Gradle**/**Grails** to download the SDK. com.tencent.tcvectordb vectordatabase-sdk-java - 2.0.16 + 2.1.0 ``` - Gradle/Grails ```gradle - compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.0.16' + compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.1.0' ``` ### Examples diff --git a/tcvectordb/README.md b/tcvectordb/README.md index de6c1f4..cb9414f 100644 --- a/tcvectordb/README.md +++ b/tcvectordb/README.md @@ -24,14 +24,14 @@ You can use **Apache Maven** or **Gradle**/**Grails** to download the SDK. com.tencent.tcvectordb vectordatabase-sdk-java - 2.0.16 + 2.1.0 ``` - Gradle/Grails ```gradle - compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.0.16' + compile 'com.tencent.tcvectordb:vectordatabase-sdk-java:2.1.0' ``` ### Examples diff --git a/tcvectordb/pom.xml b/tcvectordb/pom.xml index 9e4ffe1..bd3312f 100644 --- a/tcvectordb/pom.xml +++ b/tcvectordb/pom.xml @@ -4,7 +4,7 @@ com.tencent.tcvectordb vectordatabase-sdk-java - 2.0.16 + 2.1.0 jar vectordatabase-sdk-java diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/client/VectorDBClient.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/client/VectorDBClient.java index d6e2be8..24be5cf 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/client/VectorDBClient.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/client/VectorDBClient.java @@ -443,6 +443,7 @@ public HybridSearchRes hybridSearch(String database, String collection, HybridSe } /** + * this method is deprecated, recommend use {@link VectorDBClient#addIndex(String, String, AddIndexParam)} * Used to add a scalar field index to an existing collection * (the scalar field may contain historical data or a newly added empty field) * @param database @@ -451,9 +452,65 @@ public HybridSearchRes hybridSearch(String database, String collection, HybridSe * @return * @throws VectorDBException */ + @Deprecated public BaseRes AddIndex(String database, String collection, AddIndexParam addIndexParam) throws VectorDBException { return this.stub.addIndex( new AddIndexParamInner(database, collection, addIndexParam)); } + + /** + * Used to add a scalar field index to an existing collection + * (the scalar field may contain historical data or a newly added empty field) + * @param database + * @param collection + * @param addIndexParam: + * @return + * @throws VectorDBException + */ + public BaseRes addIndex(String database, String collection, AddIndexParam addIndexParam) throws VectorDBException { + return this.stub.addIndex( + new AddIndexParamInner(database, collection, addIndexParam)); + } + + + /** + * Used to query the number of documents that match the query, if countQueryParam is null, + * return all rows number of the collection + * @param database + * @param collection + * @param countQueryParam: + * @return + * @throws VectorDBException + */ + public BaseRes count(String database, String collection, CountQueryParam countQueryParam) throws VectorDBException { + return this.stub.countDocument( + new QueryCountParamInner(database, collection, countQueryParam, this.readConsistency), false); + } + + + /** + * Currently, this method is only for dense vectors, i.e. vector + * Supports re-specifying vector index parameters, HNSW supports re-specifying M and efConstruction, IVF supports re-specifying nlist (IVF_PQ supports re-specifying M and nlist) + * Supports re-specifying similarity calculation method + * The new configuration after the vector index is modified is defined by the field vectorIndexes + * After adjusting the parameters, this interface will trigger a rebuild, and the rebuild rules are specified by the field rebuildRules + * @param database The name of the database where the collection resides. + * @param collection The name of the collection + * @param modifyVectorIndexParam Adjust vector index parameters. + * vectorIndexes (List): The vector fields to adjust + * rebuildRules: Specified rebuild rules.This interface will trigger a rebuild after adjusting + * the parameters:For example: {"drop_before_rebuild": True , "throttle": 1} + * drop_before_rebuild (bool): Whether to delete the old index before rebuilding the new index during + * index reconstruction. True: Delete the old index before rebuilding the index. + * throttle (int): Whether to limit the number of CPU cores for building the index on a single node. + * 0: No limit on CPU cores. 1: CPU core count is 1. + * @return + * @throws VectorDBException + */ + public BaseRes modifyVectorIndex(String database, String collection, ModifyVectorIndexParam modifyVectorIndexParam) throws VectorDBException { + return this.stub.modifyVectorIndex( + new ModifyIndexParamInner(database, collection, modifyVectorIndexParam), false); + } + } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExample.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExample.java index c602128..b801cb3 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExample.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExample.java @@ -53,6 +53,7 @@ public static void main(String[] args) throws InterruptedException { upsertData(client); queryData(client); // addIndex(client); + modifyVectorIndex(client); updateAndDelete(client); deleteAndDrop(client); testFilter(); @@ -234,6 +235,11 @@ private static void upsertData(VectorDBClient client) throws InterruptedExceptio System.out.println(JsonUtils.toJsonString(affectRes)); // notice:upsert 操作可用会有延迟 Thread.sleep(1000 * 5); + + BaseRes res = client.count(DBNAME,COLL_NAME, CountQueryParam.newBuilder() + .withFilter("bookName=\"三国演义\"") + .build()); + System.out.println("count document: "+ res.getCount()); } private static void queryData(VectorDBClient client) { @@ -254,7 +260,7 @@ private static void queryData(VectorDBClient client) { // 偏移 .withOffset(0) // 指定返回的 fields - .addAllOutputFields("id", "bookName") +// .addAllOutputFields("id", "bookName") // 是否返回 vector 数据 .withRetrieveVector(false) .build(); @@ -330,7 +336,7 @@ private static void updateAndDelete(VectorDBClient client) throws InterruptedExc UpdateParam updateParam = UpdateParam .newBuilder() .addAllDocumentId(documentIds) -// .withFilter("bookName=\"三国演义\"") + .withFilter("bookName=\"三国演义\"") .build(); // JSONObject data = new JSONObject("{\"page\":100, \"extend\":\"extendContent_1\",\"array_test\":[\"extendContent\",\"extendContent1\"]}"); Document updateDoc = Document @@ -353,7 +359,8 @@ private static void updateAndDelete(VectorDBClient client) throws InterruptedExc DeleteParam build = DeleteParam .newBuilder() .addAllDocumentId("0001", "0003") -// .withFilter("bookName=\"西游记\"") + .withFilter("bookName=\"西游记\"") + .withLimit(1) .build(); AffectRes deleteAffectRes = client.delete(DBNAME, COLL_NAME, build); System.out.println(deleteAffectRes.toString()); @@ -479,5 +486,27 @@ public static void testFilter() { .build().toString()); } + /** + * modifyVectorIndex test + * @param client + * @throws InterruptedException + */ + private static void modifyVectorIndex(VectorDBClient client) throws InterruptedException{ + System.out.println("--------modify vector index-------"); + Database db = client.database(DBNAME); + Collection collection = db.describeCollection(COLL_NAME); + System.out.println("before"); + System.out.println(JsonUtils.toJsonString(collection)); + BaseRes baseRes = client.modifyVectorIndex(DBNAME, COLL_NAME, ModifyVectorIndexParam.newBuilder() + .withVectorIndex(new VectorIndex(MetricType.IP, new HNSWParams(8, 100))) + .withRebuildRules(RebuildIndexParam.newBuilder().withDropBeforeRebuild(true).withThrottle(1).build()) + .build()); + System.out.println("modify res: "+ JsonUtils.toJsonString(baseRes)); + Collection collectionAfter = db.describeCollection(COLL_NAME); + System.out.println("after"); + System.out.println(JsonUtils.toJsonString(collectionAfter)); + + } + } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithEmbedding.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithEmbedding.java index e3c9d3b..f1b6b99 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithEmbedding.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithEmbedding.java @@ -58,7 +58,6 @@ public static void main(String[] args) throws Exception { queryData(client); updateAndDelete(client); deleteAndDrop(client); - testFilter(); } private static void createDatabaseAndCollection(VectorDBClient client) { @@ -228,7 +227,6 @@ private static void queryData(VectorDBClient client) { // search // 1. search 提供按照 vector 搜索的能力 // 其他选项类似 search 接口 - System.out.println("---------------------- search ----------------------"); queryParam = QueryParam.newBuilder() .withDocumentIds(documentIds) @@ -247,6 +245,7 @@ private static void queryData(VectorDBClient client) { List vector = (List) document.getVector(); vectors.add(vector); } + List> test = vectors; SearchByVectorParam searchByVectorParam = SearchByVectorParam.newBuilder() .withVectors(vectors) // 若使用 HNSW 索引,则需要指定参数ef,ef越大,召回率越高,但也会影响检索速度 @@ -436,19 +435,4 @@ MetricType.COSINE, new HNSWParams(16, 200))) .build(); } - /** - * 测试 Filter - */ - public static void testFilter() { - System.out.println("\tres: " + new Filter("author=\"jerry\"") - .and("a=1") - .or("r=\"or\"") - .orNot("rn=2") - .andNot("an=\"andNot\"") - .getCond()); - System.out.println("\tres: " + Filter.in("key", Arrays.asList("v1", "v2", "v3"))); - System.out.println("\tres: " + Filter.in("key", Arrays.asList(1, 2, 3))); - } - - } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithSparseVector.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithSparseVector.java index 1b16079..c4f0a93 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithSparseVector.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBExampleWithSparseVector.java @@ -57,7 +57,6 @@ public static void main(String[] args) throws InterruptedException { queryData(client); updateAndDelete(client); deleteAndDrop(client); - testFilter(); } @@ -370,20 +369,5 @@ MetricType.IP, new HNSWParams(16, 200))) .build(); } - /** - * 测试 Filter - */ - public static void testFilter() { - System.out.println("\tres: " + new Filter("author=\"jerry\"") - .and("a=1") - .or("r=\"or\"") - .orNot("rn=2") - .andNot("an=\"andNot\"") - .getCond()); - System.out.println("\tres: " + Filter.in("key", Arrays.asList("v1", "v2", "v3"))); - System.out.println("\tres: " + Filter.notIn("key", Arrays.asList(1, 2, 3))); - } - - } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBWithBinaryVectorExample.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBWithBinaryVectorExample.java new file mode 100644 index 0000000..240947f --- /dev/null +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBWithBinaryVectorExample.java @@ -0,0 +1,233 @@ +/* + * Copyright (C) 2023 Tencent Cloud. + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the vectordb-sdk-java), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished + * to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.tcvectordb.examples; + +import com.tencent.tcvectordb.client.VectorDBClient; +import com.tencent.tcvectordb.model.Collection; +import com.tencent.tcvectordb.model.Database; +import com.tencent.tcvectordb.model.DocField; +import com.tencent.tcvectordb.model.Document; +import com.tencent.tcvectordb.model.param.collection.*; +import com.tencent.tcvectordb.model.param.dml.*; +import com.tencent.tcvectordb.model.param.entity.AffectRes; +import com.tencent.tcvectordb.model.param.entity.BaseRes; +import com.tencent.tcvectordb.utils.BinaryUtils; +import com.tencent.tcvectordb.utils.JsonUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * VectorDB Java SDK usage example + */ +public class VectorDBWithBinaryVectorExample { + + private static final String DBNAME = "book_binary"; + private static final String COLL_NAME = "book__binary_collection"; + + public static void main(String[] args) throws InterruptedException { + +// 创建 VectorDB Client + VectorDBClient client = CommonService.initClient(); + + + // 清理环境 + CommonService.anySafe(() -> client.dropDatabase(DBNAME)); + createDatabaseAndCollection(client); + upsertData(client); + queryData(client); + deleteAndDrop(client); + + } + + + private static void createDatabaseAndCollection(VectorDBClient client) { + // 1. 创建数据库 + System.out.println("---------------------- createDatabase ----------------------"); + Database db = client.createDatabase(DBNAME); + + // 2. 列出所有数据库 + System.out.println("---------------------- listCollections ----------------------"); + List database = client.listDatabase(); + for (String s : database) { + System.out.println("\tres: " + s); + } + + // 3. 创建 collection + System.out.println("---------------------- createCollection ----------------------"); + CreateCollectionParam collectionParam = initCreateCollectionParam(COLL_NAME); + db.createCollection(collectionParam); + System.out.println(COLL_NAME + " exists: "+ db.IsExistsCollection(COLL_NAME)); + + } + + + private static void upsertData(VectorDBClient client) throws InterruptedException { + Database database = client.database(DBNAME); + Collection collection = database.describeCollection(COLL_NAME); +// List documentList = Arrays.asList( +// new JSONObject("{\"id\":\"0013\",\"vector\":[0.2123, 0.21, 0.213],\"bookName\":\"三国演义\",\"author\":\"吴承恩\",\"page\":21,\"segment\":\"富贵功名,前缘分定,为人切莫欺心。\"}"), +// new JSONObject("{\"id\":\"0014\",\"vector\":[0.2123, 0.21, 0.213],\"bookName\":\"三国演义\",\"author\":\"吴承恩\",\"page\":21,\"segment\":\"富贵功名,前缘分定,为人切莫欺心。\"}") +// ); + List documentList = new ArrayList<>(Arrays.asList( + Document.newBuilder() + .withId("0001") + .withVector(BinaryUtils.binaryToUint8(Arrays.asList(1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0))) + .addDocField(new DocField("bookName", "西游记")) + .addDocField(new DocField("author", "吴承恩")) + .build(), + Document.newBuilder() + .withId("0002") + .withVector(BinaryUtils.binaryToUint8(Arrays.asList(1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0))) + .addDocField(new DocField("bookName", "西游记")) + .addDocField(new DocField("author", "吴承恩")) + .build(), + Document.newBuilder() + .withId("0003") + .withVector(BinaryUtils.binaryToUint8(Arrays.asList(0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0))) + .addDocField(new DocField("bookName", "三国演义")) + .addDocField(new DocField("author", "罗贯中")) + .build(), + Document.newBuilder() + .withId("0004") + .withVector(BinaryUtils.binaryToUint8(Arrays.asList(0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0))) + .addDocField(new DocField("bookName", "三国演义")) + .addDocField(new DocField("author", "罗贯中")) + .build(), + Document.newBuilder() + .withId("0005") + .withVector(BinaryUtils.binaryToUint8(Arrays.asList(0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0))) + .addDocField(new DocField("bookName", "三国演义")) + .addDocField(new DocField("author", "罗贯中")) + .build())); + System.out.println("---------------------- upsert ----------------------"); + InsertParam insertParam = InsertParam.newBuilder().withDocuments(documentList).build(); + +// collection.upsert(insertParam); + AffectRes affectRes = client.upsert(DBNAME,COLL_NAME, insertParam); + System.out.println(JsonUtils.toJsonString(affectRes)); + // notice:upsert 操作可用会有延迟 + Thread.sleep(1000 * 5); + } + + private static void queryData(VectorDBClient client) { + Database database = client.database(DBNAME); + Collection collection = database.describeCollection(COLL_NAME); + + System.out.println("---------------------- query ----------------------"); + List documentIds = Arrays.asList("0001", "0002", "0003", "0004", "0005"); + List outputFields = Arrays.asList("id", "bookName"); + QueryParam queryParam = QueryParam.newBuilder() + .withDocumentIds(Arrays.asList("0001", "0002", "0003", "0004", "0005")) + // limit 限制返回行数,1 到 16384 之间 + .withLimit(5) + .withFilter("bookName=\"三国演义\"") + // 偏移 + .withOffset(0) + // 指定返回的 fields + .addAllOutputFields("id", "bookName") + // 是否返回 vector 数据 + .withRetrieveVector(true) + .build(); + List qdos = collection.query(queryParam); + for (Document doc : qdos) { + System.out.println("\tres: " + doc.toString()); + } + + + // searchById + // 1. searchById 提供按 id 搜索的能力 + // 2. 支持通过 filter 过滤数据 + // 3. 如果仅需要部分 field 的数据,可以指定 output_fields 用于指定返回数据包含哪些 field,不指定默认全部返回 + // 4. limit 用于限制每个单元搜索条件的条数,如 vector 传入三组向量,limit 为 3,则 limit 限制的是每组向量返回 top 3 的相似度向量 + + System.out.println("---------------------- searchById ----------------------"); + SearchByIdParam searchByIdParam = SearchByIdParam.newBuilder() + .withDocumentIds(Arrays.asList("0001")) + // 若使用 HNSW 索引,则需要指定参数 ef,ef 越大,召回率越高,但也会影响检索速度 + .withParams(new HNSWSearchParams(100)) + // 指定 Top K 的 K 值 + .withLimit(2) + .build(); + List> siDocs = client.searchById(DBNAME, COLL_NAME, searchByIdParam); + int i = 0; + for (List docs : siDocs) { + System.out.println("\tres: " + i++); + for (Document doc : docs) { + System.out.println("\tres: " + doc.toString()); + } + } + + + // search + // 1. search 提供按照 vector 搜索的能力 + // 其他选项类似 search 接口 + System.out.println("---------------------- search ----------------------"); + SearchByVectorParam searchByVectorParam = SearchByVectorParam.newBuilder() + .addVector(BinaryUtils.binaryToUint8(Arrays.asList(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1))) + // 若使用 HNSW 索引,则需要指定参数ef,ef越大,召回率越高,但也会影响检索速度 + .withParams(new HNSWSearchParams(100)) + // 指定 Top K 的 K 值 + .withLimit(10) + .build(); + // 输出相似性检索结果,检索结果为二维数组,每一位为一组返回结果,分别对应 search 时指定的多个向量 + List> svDocs = client.search(DBNAME, COLL_NAME, searchByVectorParam); + i = 0; + for (List docs : svDocs) { + System.out.println("\tres: " + i); + i++; + for (Document doc : docs) { + System.out.println("\tres: " + doc.toString()); + } + } + } + + private static void deleteAndDrop(VectorDBClient client) { + Database database = client.database(DBNAME); + + // 删除 collection + System.out.println("---------------------- truncate collection ----------------------"); + database.dropCollection(COLL_NAME); + + // 删除 database + System.out.println("---------------------- drop database ----------------------"); + client.dropDatabase(DBNAME); + } + + private static CreateCollectionParam initCreateCollectionParam(String collName) { + + return CreateCollectionParam.newBuilder() + .withName(collName) + .withShardNum(1) + .withReplicaNum(1) + .withDescription("test binary collection") + .addField(new FilterIndex("id", FieldType.String, IndexType.PRIMARY_KEY)) + .addField(new VectorIndex("vector", 16, FieldType.BinaryVector, IndexType.BIN_FLAT, + MetricType.HAMMING)) + .withFilterIndexConfig(FilterIndexConfig.newBuilder() + .withFilterAll(true) + .withFieldWithoutFilterIndex(Arrays.asList("test1", "test2")) + .withMaxStrLen(64) + .build()) + .build(); + } +} diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBWithHybridSearchEmbeddingExample.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBWithHybridSearchEmbeddingExample.java new file mode 100644 index 0000000..a851941 --- /dev/null +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/examples/VectorDBWithHybridSearchEmbeddingExample.java @@ -0,0 +1,189 @@ +/* + * Copyright (C) 2023 Tencent Cloud. + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the vectordb-sdk-java), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished + * to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.tcvectordb.examples; + +import com.tencent.tcvdbtext.encoder.SparseVectorBm25Encoder; +import com.tencent.tcvectordb.client.VectorDBClient; +import com.tencent.tcvectordb.model.Collection; +import com.tencent.tcvectordb.model.Database; +import com.tencent.tcvectordb.model.DocField; +import com.tencent.tcvectordb.model.Document; +import com.tencent.tcvectordb.model.param.collection.*; +import com.tencent.tcvectordb.model.param.dml.*; +import com.tencent.tcvectordb.model.param.entity.AffectRes; +import com.tencent.tcvectordb.model.param.enums.EmbeddingModelEnum; +import com.tencent.tcvectordb.utils.BinaryUtils; +import com.tencent.tcvectordb.utils.JsonUtils; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * VectorDB Java SDK usage example + */ +public class VectorDBWithHybridSearchEmbeddingExample { + + private static final String DBNAME = "book_hybrid_embedding"; + private static final String COLL_NAME = "book_embedding_collection"; + + public static void main(String[] args) throws InterruptedException { + +// 创建 VectorDB Client + VectorDBClient client = CommonService.initClient(); + + // 清理环境 + CommonService.anySafe(() -> client.dropDatabase(DBNAME)); + createDatabaseAndCollection(client); + upsertData(client); + searchData(client); + deleteAndDrop(client); + + } + + + private static void createDatabaseAndCollection(VectorDBClient client) { + // 1. 创建数据库 + System.out.println("---------------------- createDatabase ----------------------"); + Database db = client.createDatabase(DBNAME); + + // 2. 列出所有数据库 + System.out.println("---------------------- listCollections ----------------------"); + List database = client.listDatabase(); + for (String s : database) { + System.out.println("\tres: " + s); + } + + // 3. 创建 collection + System.out.println("---------------------- createCollection ----------------------"); + CreateCollectionParam collectionParam = initCreateCollectionParam(COLL_NAME); + db.createCollection(collectionParam); + System.out.println(COLL_NAME + " exists: "+ db.IsExistsCollection(COLL_NAME)); + + } + + + private static void upsertData(VectorDBClient client) throws InterruptedException { + Database database = client.database(DBNAME); + Collection collection = database.describeCollection(COLL_NAME); + SparseVectorBm25Encoder bm25Encoder = SparseVectorBm25Encoder.getDefaultBm25Encoder(); + List texts = Arrays.asList( + "腾讯云向量数据库(Tencent Cloud VectorDB)是一款全托管的自研企业级分布式数据库服务,专用于存储、索引、检索、管理由深度神经网络或其他机器学习模型生成的大量多维嵌入向量。", + "作为专门为处理输入向量查询而设计的数据库,它支持多种索引类型和相似度计算方法,单索引支持10亿级向量规模,高达百万级 QPS 及毫秒级查询延迟。", + "不仅能为大模型提供外部知识库,提高大模型回答的准确性,还可广泛应用于推荐系统、NLP 服务、计算机视觉、智能客服等 AI 领域。", + "腾讯云向量数据库(Tencent Cloud VectorDB)作为一种专门存储和检索向量数据的服务提供给用户, 在高性能、高可用、大规模、低成本、简单易用、稳定可靠等方面体现出显著优势。 ", + "腾讯云向量数据库可以和大语言模型 LLM 配合使用。企业的私域数据在经过文本分割、向量化后,可以存储在腾讯云向量数据库中,构建起企业专属的外部知识库,从而在后续的检索任务中,为大模型提供提示信息,辅助大模型生成更加准确的答案。"); + List>> sparseVectors = bm25Encoder.encodeTexts(texts); + + List documentList = new ArrayList<>(Arrays.asList( + Document.newBuilder() + .withId("0001") + .addDocField(new DocField("text", texts.get(0))) + .withSparseVector(sparseVectors.get(0)) + .build(), + Document.newBuilder() + .withId("0002") + .withSparseVector(sparseVectors.get(1)) + .addDocField(new DocField("text", texts.get(1))) + .build(), + Document.newBuilder() + .withId("0003") + .withSparseVector(sparseVectors.get(2)) + .addDocField(new DocField("text", texts.get(2))) + .build(), + Document.newBuilder() + .withId("0004") + .withSparseVector(sparseVectors.get(3)) + .addDocField(new DocField("text", texts.get(3))) + .build(), + Document.newBuilder() + .withId("0005") + .withSparseVector(sparseVectors.get(4)) + .addDocField(new DocField("text", texts.get(4))) + .build())); + System.out.println("---------------------- upsert ----------------------"); + InsertParam insertParam = InsertParam.newBuilder().withDocuments(documentList).build(); + +// collection.upsert(insertParam); + AffectRes affectRes = client.upsert(DBNAME,COLL_NAME, insertParam); + System.out.println(JsonUtils.toJsonString(affectRes)); + // notice:upsert 操作可用会有延迟 + Thread.sleep(1000 * 5); + } + + private static void searchData(VectorDBClient client) { + // search稀疏向量搜索和向量搜索混合 +// List vector = Arrays.asList(0.011228000745177269,-0.01778145506978035,-0.0008420095546171069,0.058591078966856,0.025626985356211662,-0.009485375136137009,0.0044272118248045444,0.03963795304298401,-0.07349739968776703,0.033373408019542694,-0.017562853172421455,-0.06693584471940994,-0.0008283713832497597,-0.09282511472702026,0.019856665283441544,0.0029369608964771032,0.025461247190833092,0.043309904634952545,-0.0010940685169771314,-0.02834116853773594,0.024333607405424118,-0.06358671933412552,0.0004886172828264534,-0.003996695391833782,-0.005141071975231171,0.031137600541114807,-0.03720816969871521,0.03373042494058609,-0.005284181796014309,0.06811655312776566,0.024133838713169098,-0.008262764662504196,-0.02401343360543251,0.01113040093332529,-0.019650375470519066,0.02405945584177971,0.008977336809039116,-0.022214235737919807,0.010524755343794823,-0.06512012332677841,-0.0070442515425384045,0.039866313338279724,0.003659360809251666,-0.014790602959692478,0.03323712199926376,0.030882341787219048,0.012858539819717407,0.03626066818833351,-0.02777714841067791,-0.0006111871916800737,0.011951539665460587,0.21934707462787628,-0.009810359217226505,-0.006874813232570887,0.07120531797409058,0.028546100482344627,0.01646684668958187,0.06472000479698181,-0.024948634207248688,0.02457079477608204,0.015692222863435745,0.015110153704881668,0.04548252373933792,-0.034427206963300705,0.0035766353830695152,-0.0063577317632734776,-0.03640788421034813,-0.03309265896677971,0.016592761501669884,-0.0184243842959404,0.025951147079467773,0.0009172717691399157,-0.020834090188145638,-0.029650429263710976,-0.00929233431816101,-0.02037796750664711,0.005400816909968853,-0.003652009414508939,0.0004404079227242619,0.004375770688056946,0.04158478602766991,0.0022120948415249586,0.023043958470225334,0.02082330361008644,-0.03482123836874962,-0.039342183619737625,-0.022602153941988945,0.006933159194886684,0.020710067823529243,0.02493712119758129,0.008838232606649399,-0.01082011591643095,-0.04711829870939255,0.015358409844338894,-0.05259833112359047,0.03564944863319397,-0.02094186656177044,-0.014302685856819153,-0.0009043896570801735,0.060996394604444504,0.012411488220095634,-0.014214642345905304,-0.026238352060317993,-0.033097539097070694,0.019276197999715805,0.019927779212594032,-0.0897335335612297,0.04069192707538605,0.016967572271823883,0.012736618518829346,0.007248705718666315,-0.042650915682315826,-0.012213833630084991,0.029378674924373627,-0.01131758838891983,-0.017445610836148262,0.01528218761086464,-0.0010133420582860708,0.008936449885368347,-0.04863755777478218,0.006830527447164059,-0.0006641799700446427,-0.03017701581120491,0.0045319232158362865,-0.025610102340579033,-0.024471720680594444,-0.028333375230431557,0.04000883921980858,0.007346018683165312,0.013694453984498978,-0.010897736065089703,-0.009626672603189945,-0.05798979103565216,0.014471616595983505,0.005314654670655727,-0.027487266808748245,-0.020013470202684402,-0.02379809133708477,-0.019267942756414413,-7.192990597104654e-05,0.03751828148961067,0.051989246159791946,0.02207176946103573,0.015709249302744865,0.04722846299409866,-0.009285308420658112,0.048197753727436066,0.0047728074714541435,0.03828258439898491,0.011275202967226505,0.03798242658376694,0.052456334233284,-0.02123964950442314,0.10464958846569061,-0.00095760339172557,0.005099969916045666,-0.01903274841606617,0.033146798610687256,-0.001944964868016541,0.03544747456908226,0.05200682580471039,0.004140638280659914,-0.001272501889616251,-0.029995812103152275,-0.036847393959760666,0.07203970104455948,-0.03457489609718323,0.013243802823126316,-0.0024343973491340876,0.04353635758161545,0.011767414398491383,-0.03771014139056206,-0.03384077921509743,-0.06499378383159637,-0.08102220296859741,0.06842608004808426,-0.007303804624825716,0.007441019639372826,0.00384475733153522,-0.015521292574703693,0.001064897864125669,-0.017786353826522827,0.0228169746696949,-0.0017404690152034163,-0.08029986172914505,-0.023406831547617912,-0.02028321474790573,-0.03325213864445686,0.011658839881420135,-0.02427353709936142,0.02202378585934639,0.012910107150673866,-0.028136733919382095,0.042230330407619476,0.04168698564171791,0.015558804385364056,-0.06827197968959808,0.03491898998618126,-0.04686718061566353,0.027400435879826546,0.009755358099937439,0.025745362043380737,-0.009593848139047623,0.08101218193769455,-0.023704754188656807,0.02434670366346836,0.021201400086283684,-0.02352142333984375,0.02945014089345932,-0.006461021490395069,0.0025584660470485687,-0.045635148882865906,0.011546051129698753,-0.03846436366438866,0.002660631900653243,0.011385934427380562,-0.054820869117975235,-0.027538765221834183,-0.012130278162658215,0.02718573808670044,0.05753879249095917,-0.024369744583964348,0.013582611456513405,-0.08181896805763245,-0.04349633306264877,0.03299983590841293,-0.004695754963904619,-0.01692030020058155,-0.011063349433243275,-0.00014669759548269212,0.014689693227410316,-0.038261156529188156,-0.015512768179178238,-0.004468604456633329,-0.048229288309812546,0.006024762522429228,-0.04957364872097969,0.00813916977494955,-0.026627950370311737,-0.009431248530745506,-0.0024864417500793934,0.017048964276909828,-0.02847607247531414,-0.020705807954072952,0.004949160385876894,-0.015850678086280823,0.060216374695301056,-0.015156073495745659,-0.007588365115225315,-0.037351079285144806,0.04218784347176552,0.020519305020570755,-0.0010683962609618902,-0.01784857176244259,-0.001070767524652183,-0.06896337121725082,-0.013779735192656517,0.02152661606669426,-0.042298782616853714,-0.09644242376089096,-0.043055132031440735,-0.013538303785026073,0.04751390591263771,0.057626064866781235,-0.009500116109848022,0.00708649680018425,-0.024209508672356606,-0.08286508917808533,-0.007599340286105871,0.032298244535923004,0.06640364229679108,0.024041226133704185,0.004293238278478384,0.020563913509249687,-0.022327011451125145,0.053777556866407394,-0.018423566594719887,-0.035526152700185776,-0.05626888573169708,0.016877761110663414,0.006738790310919285,0.06473775207996368,0.004535271320492029,0.04972827062010765,-0.07362700998783112,-0.0030079265125095844,0.059974104166030884,-0.013675615191459656,-0.034515395760536194,0.014622291550040245,-0.03385680168867111,-0.025142354890704155,0.0254383347928524,0.001493200776167214,0.334794282913208,0.02830587700009346,-0.07777972519397736,0.043088871985673904,-0.01293167844414711,-0.005174708086997271,-0.00581933930516243,-0.07398725301027298,0.017567740753293037,0.022265968844294548,0.11928874999284744,-0.055033378303050995,0.02395421266555786,-0.011595740914344788,0.02233700640499592,-0.018687181174755096,-0.06958524882793427,0.0009067300125025213,-0.00466264970600605,-0.03959940746426582,0.025952531024813652,0.01941017434000969,-0.03903195634484291,-0.0022335450630635023,0.0676443874835968,0.029737481847405434,-0.015014370903372765,0.007381070405244827,-0.0484633669257164,0.023242061957716942,-0.03460437059402466,-0.013248912990093231,-0.012566791847348213,-0.02383880689740181,0.014195072464644909,0.009522831067442894,0.05593474581837654,-0.048447150737047195,0.024550078436732292,-0.01998014561831951,0.004192877560853958,-0.0007203511777333915,-0.06000881642103195,0.007732178084552288,0.003466855501756072,-0.03827047348022461,0.024848824366927147,0.013989027589559555,0.017047369852662086,0.024627817794680595,0.019813280552625656,0.010560467839241028,-0.007128795608878136,0.021267788484692574,-0.05038474127650261,0.01119161769747734,0.01583665981888771,-0.0710073783993721,0.0680229514837265,0.015228376723825932,0.012478475458920002,-0.0007914555608294904,0.04503822326660156,-0.022816233336925507,-0.029615147039294243,-0.04138007014989853,0.015486898832023144,-0.033105045557022095,-0.027106864377856255,-0.018030496314167976,0.026013921946287155,0.005876969546079636,0.02092624269425869,0.05155663192272186,0.0006067254580557346,-0.060211531817913055,0.059832267463207245,0.009218663908541203,0.0034593825694173574,0.00601182272657752,0.0525486096739769,-0.017541436478495598,-0.016692979261279106,-0.012630617246031761,0.011909610591828823,0.027539147064089775,0.030525386333465576,-0.052341122180223465,-0.04240258410573006,-0.015112871304154396,-0.011462653055787086,0.016128763556480408,0.01829593814909458,-0.009016308933496475,-0.04230230674147606,0.007138686720281839,0.011453477665781975,-0.025860127061605453,0.023999856784939766,0.020570704713463783,-0.028624074533581734,0.01875831000506878,0.0018658454064279795,0.02916049025952816,-0.057269223034381866,0.0036049848422408104,0.010065961629152298,0.007160463370382786,-0.056595977395772934,-0.03341779485344887,-0.053864892572164536,-0.006826115772128105,-0.03297588229179382,0.01128164678812027,0.022906454280018806,-0.0031081661581993103,0.0009896974079310894,-0.042085934430360794,-0.05885877087712288,0.0595456063747406,0.010770737193524837,-0.021534759551286697,-0.03322180360555649,-0.04332531988620758,-0.03466140478849411,0.022178784012794495,-0.01332541648298502,-0.05094131454825401,0.04912945628166199,0.024204950779676437,-0.01659112051129341,-0.042198680341243744,0.051028888672590256,0.02925165370106697,-0.017100905999541283,0.008829696103930473,0.00015294468903448433,-0.010915480554103851,-0.015350918285548687,-0.06739851087331772,0.049365222454071045,0.009364373981952667,-0.021441806107759476,0.005624465644359589,0.04153790697455406,0.031615592539310455,0.009158196859061718,0.011399844661355019,-0.036585573107004166,0.008067300543189049,0.04017193615436554,-0.0044442773796617985,-0.030282024294137955,0.011847498826682568,0.005726383533328772,-0.014980319887399673,0.01719740219414234,-0.05555087700486183,0.009031839668750763,-0.03642238676548004,-0.04240124672651291,-0.023465050384402275,-0.0525900200009346,-0.019889121875166893,0.007329991087317467,-0.0348493717610836,-0.012565468437969685,0.00489308126270771,-0.01772800274193287,-0.03134306147694588,0.04384829103946686,0.03994167596101761,0.027157746255397797,0.05475940182805061,0.06232653930783272,0.020926667377352715,0.023273082450032234,0.00895698368549347,-0.021297913044691086,-0.007659547030925751,-0.0017791312420740724,0.01271106954663992,0.0007611988694407046,-0.019898725673556328,0.01639355905354023,-0.029277022927999496,0.024333303794264793,-0.016217123717069626,-0.05249570310115814,0.06855613738298416,0.019668709486722946,-0.013475027866661549,0.040491845458745956,-0.012874310836195946,-0.03878059238195419,-0.007048196159303188,-0.010489973239600658,-0.018570009618997574,0.008968203328549862,-0.033673934638500214,-0.018318500369787216,-0.009717299602925777,0.022672802209854126,-0.031869225203990936,0.025763994082808495,-0.04749876633286476,-0.048569515347480774,0.015351547859609127,-0.006761960685253143,0.02838185615837574,-0.0014055072097107768,-0.05071890354156494,-0.0023035514168441296,0.016775229945778847,0.038840923458337784,-0.002485994016751647,0.05317004397511482,-0.012521522119641304,0.026492154225707054,0.041588228195905685,0.016285225749015808,-0.03644036501646042,-0.018341371789574623,-0.001415338832885027,-0.017596542835235596,-0.0425528883934021,0.006830585654824972,-0.05454989895224571,0.03156057000160217,-0.0042657870799303055,-0.023661328479647636,-0.017319653183221817,-0.02879355102777481,0.006474115885794163,-0.05250633880496025,0.025808880105614662,-0.02048797346651554,-0.05077805370092392,-0.014409005641937256,0.012029886245727539,0.012740569189190865,0.022116873413324356,0.03960123285651207,-0.03199855983257294,-0.008848310448229313,-0.07307054847478867,-0.03872452303767204,-0.029967492446303368,0.03927792236208916,-0.035551927983760834,0.02775380201637745,-0.0018905715551227331,0.013925244100391865,0.01124342530965805,0.012179143726825714,-0.022628935053944588,0.022103911265730858,0.049286894500255585,-0.07614579051733017,0.03758956119418144,0.006597153376787901,-0.009310507215559483,-0.05107691138982773,-0.007727780379354954,-0.009930762462317944,0.01052931509912014,-0.022319145500659943,0.017863847315311432,0.010758845135569572,0.013254022225737572,-0.000858207989949733,-0.025006303563714027,-0.02406756952404976,-0.008208317682147026,-0.010748173110187054,-0.00698865344747901,-0.038527026772499084,-0.003004539292305708,-0.02299804426729679,-0.009805059060454369,0.028496552258729935,0.01125089917331934,0.03175720199942589,-0.03186783194541931,-0.023211995139718056,-0.012901285663247108,-0.011883283965289593,-0.035922542214393616,-0.0054933540523052216,-0.03287219628691673,0.0075798616744577885,-0.017400970682501793,-0.06543558835983276,-0.07086843997240067,-0.02236025407910347,0.011312036775052547,0.013881144113838673,0.011187789030373096,-0.021352853626012802,0.01209521759301424,0.010986448265612125,0.0280466265976429,0.0028384842444211245,-0.012631536461412907,-0.013534322381019592,-0.015131715685129166,0.040526192635297775,0.03799454867839813,0.0175810307264328,0.0023343598004430532,0.004337592050433159,0.011728398501873016,0.00985186081379652,-0.04791787639260292,0.0003230224538128823,0.07999759912490845,-0.05766419321298599,0.044354550540447235,0.030577993020415306,0.03863826021552086,0.012316863052546978,-0.01816105842590332,0.010841290466487408,0.0041139451786875725,0.03662897273898125,0.0702822208404541,0.053291574120521545,-0.0105751883238554,-0.011610777117311954,0.006535766180604696,-0.04369916766881943,-0.050802748650312424,-0.019643759354948997,0.014163920655846596,0.05906696245074272,0.05733434855937958,0.015502110123634338,0.04357575252652168,0.052199672907590866,0.02231508120894432,0.013078796677291393,-0.007436834741383791,-0.003492080606520176,0.01568499580025673,-0.09041984379291534,-0.0508231446146965,0.03946860134601593,0.0001249655761057511,0.016918376088142395,0.00012592262646649033,-0.07463286072015762,-0.003312620334327221,-0.0365043468773365,-0.02361810766160488,-0.026499824598431587,0.07702545076608658,0.0030056070536375046,-0.021168861538171768,0.008991563692688942,-0.04691014811396599,0.031971074640750885,-0.0174985621124506,0.05094505473971367,-0.03515065833926201,0.04063650965690613,-0.001741324202157557,0.020261533558368683,-0.058702364563941956,-0.058434709906578064,-0.05214286968111992,0.058829329907894135,-0.034132201224565506,0.018815433606505394,0.015444993041455746,-0.019551441073417664,-0.007262536324560642,0.08271834999322891,0.019005021080374718,-0.031974907964468,0.022663820534944534,0.007609522435814142,-0.09004736691713333,-0.04941195249557495,-0.006096153520047665,-0.03533686697483063,0.005633222870528698,-0.041101887822151184,0.02555353380739689,-0.023150743916630745,-0.03864051774144173,-0.011613970622420311,-0.05419612675905228,0.03341307491064072,-0.03822252154350281,-0.0159537885338068,0.05595235154032707,-0.001516361953690648,-0.008176641538739204,0.04819527268409729,-0.012294626794755459,0.034582968801259995,0.03888314217329025,-0.03052809089422226,0.017518021166324615,0.0031483874190598726,0.011357742361724377,0.045062460005283356,-0.03600004315376282,-0.002399398246780038,0.004231774713844061,0.04196177423000336,0.054733987897634506,-0.032597851008176804,-0.022816237062215805,-0.0009701708913780749,0.011314227245748043,-0.048491064459085464,-0.009732344187796116,-0.035001225769519806,-0.009082093834877014,0.0709235668182373,-0.015347892418503761,-0.0015579608734697104,0.017158204689621925,-0.05991761386394501,-0.018858136609196663,-0.001102324342355132,-0.01681104116141796,0.03128630295395851,0.026118021458387375,-0.03130285069346428,0.0374942384660244,-0.0007803713670000434,-0.03938727825880051,0.028128813952207565,-0.0022652731277048588,-0.013466103002429008,-0.0370059572160244,-0.022594835609197617,0.003917117603123188,0.02420860342681408,0.04335761442780495,0.04469241946935654,0.051333390176296234,-0.023145707324147224,0.021898699924349785,-0.04395199567079544,0.010561014525592327,0.04481233283877373,-0.012639965862035751,0.06350893527269363,0.01094555202871561,0.03683890774846077,0.019029002636671066,0.020309962332248688,0.02548789419233799,-0.015589339658617973,0.013123778626322746,0.06714979559183121,-0.005883317440748215,-0.02384098246693611,0.034502606838941574,0.04979805275797844,0.026102885603904724,-0.010899506509304047,0.03565442934632301,0.010668277740478516,-0.04402590170502663,0.05710256099700928,0.05378012731671333,-0.003941510338336229,-0.013945785351097584,0.008478756062686443,-0.048995040357112885); + System.out.println("---------------------- hybridSearch ----------------------"); + SparseVectorBm25Encoder encoder = SparseVectorBm25Encoder.getBm25Encoder("zh"); + HybridSearchParam hybridSearchParam = HybridSearchParam.newBuilder() + .withAnn(AnnOption.newBuilder().withFieldName("text") + .withTextData("什么是腾讯云向量数据库") + .build()) + .withMatch(MatchOption.newBuilder().withFieldName("sparse_vector") + .withData(encoder.encodeQueries(Arrays.asList("什么是腾讯云向量数据库"))) + .withCutoffFrequency(0.9) + .build()) + // 指定 Top K 的 K 值 + .withRerank(new WeightRerankParam(Arrays.asList("vector","sparse_vector"), Arrays.asList(1, 1))) + .withLimit(2) + .withRetrieveVector(false) + .build(); + List siDocs = client.hybridSearch(DBNAME, COLL_NAME, hybridSearchParam).getDocuments(); + int i = 0; + for (Object docs : siDocs) { + System.out.println("\tres: " + (i++) + docs.toString()); +// for (Document doc : (List)docs) { +// System.out.println("\tres: " + doc.toString()); +// } + } + } + + private static void deleteAndDrop(VectorDBClient client) { + Database database = client.database(DBNAME); + + // 删除 collection + System.out.println("---------------------- truncate collection ----------------------"); + database.dropCollection(COLL_NAME); + + // 删除 database + System.out.println("---------------------- delete database ----------------------"); + client.dropDatabase(DBNAME); + } + + private static CreateCollectionParam initCreateCollectionParam(String collName) { + + return CreateCollectionParam.newBuilder() + .withName(collName) + .withShardNum(1) + .withReplicaNum(1) + .withDescription("test hybrid embedding collection") + .addField(new FilterIndex("id", FieldType.String, IndexType.PRIMARY_KEY)) + .addField(new VectorIndex("vector", 768, FieldType.Vector, IndexType.HNSW, + MetricType.IP, new HNSWParams(16, 200))) + .addField(new SparseVectorIndex("sparse_vector", IndexType.INVERTED, MetricType.IP)) + .withEmbedding(Embedding.newBuilder().withVectorField("vector"). + withField("text").withModelName(EmbeddingModelEnum.BGE_BASE_ZH.getModelName()).build()) + .withFilterIndexConfig(FilterIndexConfig.newBuilder().withFilterAll(true).build()) + .build(); + } +} diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Collection.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Collection.java index c0a9df0..81c8ead 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Collection.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Collection.java @@ -214,6 +214,7 @@ public void setEmbedding(Embedding embedding) { this.embedding = embedding; } + /** * upsert document, upsert documents into the collection * @param param InsertParam: upsert data. buildIndex is whether to build index, default is true, documents @@ -405,18 +406,64 @@ public BaseRes rebuildIndex(RebuildIndexParam rebuildIndexParam) { return this.stub.rebuildIndex(new RebuildIndexParamInner(database, collection, rebuildIndexParam)); } + /** + * this method is deprecated, recommend use {@link Collection#addIndex(String, String, AddIndexParam)} + * Used to add a scalar field index to an existing collection + * (the scalar field may contain historical data or a newly added empty field) + * @param database + * @param collection + * @param addIndexParam: + * @return + * @throws VectorDBException + */ + @Deprecated + public BaseRes AddIndex(String database, String collection, AddIndexParam addIndexParam) throws VectorDBException { + return this.stub.addIndex( + new AddIndexParamInner(database, collection, addIndexParam)); + } + + /** * Used to add a scalar field index to an existing collection * (the scalar field may contain historical data or a newly added empty field) + * @param database + * @param collection * @param addIndexParam: * @return * @throws VectorDBException */ - public BaseRes AddIndex(AddIndexParam addIndexParam) throws VectorDBException { + public BaseRes addIndex(String database, String collection, AddIndexParam addIndexParam) throws VectorDBException { return this.stub.addIndex( new AddIndexParamInner(database, collection, addIndexParam)); } + /** + * Used to query the number of documents that match the query, if countQueryParam is null, + * return all rows number of the collection + * @param countQueryParam: + * @return + * @throws VectorDBException + */ + public BaseRes count(CountQueryParam countQueryParam) throws VectorDBException { + return this.stub.countDocument( + new QueryCountParamInner(database, collection, countQueryParam, this.readConsistency), false); + } + + /** + * Currently, this method is only for dense vectors, i.e. vector + * Supports re-specifying vector index parameters, HNSW supports re-specifying M and efConstruction, IVF supports re-specifying nlist (IVF_PQ supports re-specifying M and nlist) + * Supports re-specifying similarity calculation method + * The new configuration after the vector index is modified is defined by the field vectorIndexes + * After adjusting the parameters, this interface will trigger a rebuild, and the rebuild rules are specified by the field rebuildRules + * @param modifyVectorIndexParam + * @return + * @throws VectorDBException + */ + public BaseRes modifyVectorIndex(ModifyVectorIndexParam modifyVectorIndexParam) throws VectorDBException { + return this.stub.modifyVectorIndex( + new ModifyIndexParamInner(database, collection, modifyVectorIndexParam), false); + } + @Override public String toString() { ObjectMapper mapper = new ObjectMapper(); diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/CollectionView.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/CollectionView.java index de3bc24..c3bc6e2 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/CollectionView.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/CollectionView.java @@ -308,8 +308,6 @@ public DocumentSet getDocumentSetById(String documentSetId) throws VectorDBExcep * rerank : Parameters for Rerank * filter : The optional filter condition of the scalar index field * limit : The limit of the query result, not support now - * timeout : An optional duration of time in seconds to allow for the request. - * When timeout is set to None, will use the connect timeout. * * @return List * @throws VectorDBException diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Database.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Database.java index 09d922c..e154164 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Database.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Database.java @@ -70,17 +70,16 @@ public ReadConsistencyEnum getReadConsistency() { /*** * create collection * @param param createCollectionParam: the parameters of the collection to be created - * @param param databaseName: the name of the database to be created - * @param param collection: the name of the collection to be created - * @param param replicaNum: the number of replicas - * @param param shardNum: the number of shards - * @param param description: the description of the collection - * @param param indexes: list of the index fields - * @param param embedding: Embedding class - * @param param ttlConfig: TTLConfig class + * databaseName: the name of the database to be created + * collection: the name of the collection to be created + * replicaNum: the number of replicas + * shardNum: the number of shards + * description: the description of the collection + * indexes: list of the index fields + * embedding: Embedding class + * ttlConfig: TTLConfig class * * @return collection object - * @throws VectorDBException */ public Collection createCollection(CreateCollectionParam param) throws VectorDBException { param.setDatabase(databaseName); @@ -93,13 +92,13 @@ public Collection createCollection(CreateCollectionParam param) throws VectorDBE /*** * create collection if not exists * @param param createCollectionParam: the parameters of the collection to be created - * @param param databaseName: the name of the database to be created - * @param param collection: the name of the collection to be created - * @param param replicaNum: the number of replicas - * @param param shardNum: the number of shards - * @param param description: the description of the collection - * @param param indexes: list of the index fields - * @param param embedding: Embedding class + * databaseName: the name of the database to be created + * collection: the name of the collection to be created + * replicaNum: the number of replicas + * shardNum: the number of shards + * description: the description of the collection + * indexes: list of the index fields + * embedding: Embedding class * * @return collection object * @throws VectorDBException diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Document.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Document.java index 7c3f2a7..089600d 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Document.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/Document.java @@ -142,8 +142,8 @@ public String toString() { if(vector instanceof List){ ArrayNode vectorNode = JsonNodeFactory.instance.arrayNode(); ((List) vector).forEach(ele->{ - if (ele instanceof Double) { - vectorNode.add(((Double) ele).doubleValue()); + if (ele instanceof Number) { + vectorNode.add(((Number) ele).doubleValue()); } if (ele instanceof String) { vectorNode.add(ele.toString()); @@ -214,7 +214,7 @@ public Builder withId(String id) { return this; } - public Builder withVector(List vector) { + public Builder withVector(List vector) { this.vector = vector; return this; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/CreateCollectionParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/CreateCollectionParam.java index e853dab..fda65a0 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/CreateCollectionParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/CreateCollectionParam.java @@ -109,10 +109,10 @@ public Builder withDatabase(String database){ return this; } -// public Builder withFilterIndexConfig(FilterIndexConfig filterIndexConfig) { -// this.filterIndexConfig = filterIndexConfig; -// return this; -// } + public Builder withFilterIndexConfig(FilterIndexConfig filterIndexConfig) { + this.filterIndexConfig = filterIndexConfig; + return this; + } public CreateCollectionParam build() throws ParamException { if (StringUtils.isEmpty(this.name)) { diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FieldType.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FieldType.java index f988145..431cd98 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FieldType.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FieldType.java @@ -39,6 +39,11 @@ public enum FieldType { */ Vector("vector"), + /** + * binary vector + */ + BinaryVector("binary_vector"), + /** * array 类型 */ diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FilterIndexConfig.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FilterIndexConfig.java index 1b80d42..c7bf894 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FilterIndexConfig.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/FilterIndexConfig.java @@ -1,6 +1,7 @@ package com.tencent.tcvectordb.model.param.collection; import com.fasterxml.jackson.annotation.JsonInclude; +import com.tencent.tcvdbtext.exception.ParamException; import java.util.ArrayList; import java.util.List; @@ -24,12 +25,14 @@ @JsonInclude(value = JsonInclude.Include.NON_NULL) public class FilterIndexConfig { private boolean filterAll; - private List fieldWithoutFilterIndex = new ArrayList<>(); - private int maxStrLen=32; + private List fieldsWithoutIndex = new ArrayList<>(); + private Integer maxStrLen; + + public FilterIndexConfig(){} public FilterIndexConfig(Builder builder) { this.filterAll = builder.filterAll; - this.fieldWithoutFilterIndex = builder.fieldWithoutFilterIndex; + this.fieldsWithoutIndex = builder.fieldWithoutFilterIndex; this.maxStrLen = builder.maxStrLen; } @@ -42,19 +45,19 @@ public void setFilterAll(boolean filterAll) { this.filterAll = filterAll; } - public List getFieldWithoutFilterIndex() { - return fieldWithoutFilterIndex; + public List getFieldsWithoutIndex() { + return fieldsWithoutIndex; } - public void setFieldWithoutFilterIndex(List fieldWithoutFilterIndex) { - this.fieldWithoutFilterIndex = fieldWithoutFilterIndex; + public void setFieldsWithoutIndex(List fieldsWithoutIndex) { + this.fieldsWithoutIndex = fieldsWithoutIndex; } - public int getMaxStrLen() { + public Integer getMaxStrLen() { return maxStrLen; } - public void setMaxStrLen(int maxStrLen) { + public void setMaxStrLen(Integer maxStrLen) { this.maxStrLen = maxStrLen; } @@ -66,7 +69,7 @@ public static Builder newBuilder() { public static class Builder { private boolean filterAll; private List fieldWithoutFilterIndex; - private int maxStrLen; + private Integer maxStrLen = 32; private Builder() { @@ -82,11 +85,14 @@ public Builder withFieldWithoutFilterIndex(List fieldWithoutFilterIndex) return this; } - public Builder withMaxStrLen(int maxStrLen) { + public Builder withMaxStrLen(Integer maxStrLen) { this.maxStrLen = maxStrLen; return this; } public FilterIndexConfig build() { + if (this.maxStrLen!=null && this.maxStrLen==0){ + throw new ParamException("The value of maxStrLen cannot be 0."); + } return new FilterIndexConfig(this); } } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexField.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexField.java index de958f1..ea7f597 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexField.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexField.java @@ -57,7 +57,7 @@ public IndexType getIndexType() { @JsonIgnore public boolean isVectorField() { - return FieldType.Vector.equals(this.fieldType); + return FieldType.Vector.equals(this.fieldType) || FieldType.BinaryVector.equals(this.fieldType); } @JsonIgnore diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexType.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexType.java index 4eb2d4c..70ea5ee 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexType.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/IndexType.java @@ -57,7 +57,7 @@ public enum IndexType { INVERTED("inverted"), -// BIN_FLAT("BIN_FLAT"), + BIN_FLAT("BIN_FLAT"), // // BIN_HNSW("BIN_HNSW"), diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/MetricType.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/MetricType.java index 433eef1..96d3b32 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/MetricType.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/MetricType.java @@ -20,6 +20,8 @@ package com.tencent.tcvectordb.model.param.collection; +import com.fasterxml.jackson.annotation.JsonValue; + /** * MetricType */ @@ -35,12 +37,12 @@ public enum MetricType { /** * cosine */ - COSINE("COSINE"); + COSINE("COSINE"), /** * hamming */ -// HAMMING("HAMMING"); + HAMMING("Hamming"); private final String value; @@ -48,6 +50,7 @@ private MetricType(String value) { this.value = value; } + @JsonValue public String getValue() { return value; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/VectorIndex.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/VectorIndex.java index a42d458..c608eba 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/VectorIndex.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collection/VectorIndex.java @@ -36,4 +36,31 @@ public VectorIndex(String fieldName, Integer dimension, setMetricType(metricType); setParams(params); } + + public VectorIndex(String fieldName, Integer dimension, FieldType fieldType, + IndexType indexType, MetricType metricType, + ParamsSerializer params) { + setFieldName(fieldName); + setFieldType(fieldType); + setIndexType(indexType); + setDimension(dimension); + setMetricType(metricType); + setParams(params); + } + + public VectorIndex(MetricType metricType, ParamsSerializer params) { + setFieldName("vector"); + setFieldType(FieldType.Vector); + setMetricType(metricType); + setParams(params); + } + + public VectorIndex(String fieldName, Integer dimension, FieldType fieldType, + IndexType indexType, MetricType metricType) { + setFieldName(fieldName); + setFieldType(fieldType); + setIndexType(indexType); + setDimension(dimension); + setMetricType(metricType); + } } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collectionView/LoadAndSplitTextParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collectionView/LoadAndSplitTextParam.java index ecd0cb0..88d4511 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collectionView/LoadAndSplitTextParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/collectionView/LoadAndSplitTextParam.java @@ -6,6 +6,7 @@ /** * LoadAndSplitTextParam upload file param + * */ public class LoadAndSplitTextParam { /** diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/AnnOption.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/AnnOption.java index 9359b12..c64fab3 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/AnnOption.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/AnnOption.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; /** @@ -85,6 +86,16 @@ public Builder withData(List vector){ return this; } + public Builder withTextData(String texts){ + this.data = Collections.singletonList(texts); + return this; + } + + public Builder withTextData(List texts){ + this.data = Collections.singletonList(texts); + return this; + } + public Builder withParam(Params params){ this.params = params; return this; diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/CountQueryParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/CountQueryParam.java new file mode 100644 index 0000000..e02af0a --- /dev/null +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/CountQueryParam.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2023 Tencent Cloud. + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the vectordb-sdk-java), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished + * to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +package com.tencent.tcvectordb.model.param.dml; + +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * query count of match conditions, if filter is null, return all rows count + * Params: + * filter(Filter): filter rows before return result + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CountQueryParam { + private String filter; + + public String getFilter() { + return filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public CountQueryParam(Builder builder) { + this.filter = builder.filter; + } + public static Builder newBuilder() { + return new Builder(); + } + + public static class Builder { + + private String filter; + + public Builder withFilter(String filter) { + this.filter = filter; + return this; + } + + public Builder withFilter(Filter filter) { + this.filter = filter.getCond(); + return this; + } + + public CountQueryParam build() { + return new CountQueryParam(this); + } + } +} diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/DeleteParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/DeleteParam.java index dc8b0e5..953f1a2 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/DeleteParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/DeleteParam.java @@ -21,15 +21,26 @@ package com.tencent.tcvectordb.model.param.dml; import com.fasterxml.jackson.annotation.JsonInclude; +import com.tencent.tcvdbtext.exception.ParamException; /** * Delete Param */ @JsonInclude(JsonInclude.Include.NON_NULL) public class DeleteParam extends BaseQuery { + private Integer limit; public DeleteParam(Builder builder) { super(builder); + this.limit = builder.limit; + } + + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; } public static Builder newBuilder() { @@ -37,15 +48,23 @@ public static Builder newBuilder() { } public static class Builder extends BaseQuery.Builder { - + private Integer limit; private Builder() { super(); } public DeleteParam build() { + if (this.limit !=null && this.limit == 0){ + throw new ParamException("The value of limit cannot be 0"); + } return new DeleteParam(this); } + public Builder withLimit(Integer limit) { + this.limit = limit; + return this; + } + @Override protected Builder self() { return this; diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/HNSWSearchParams.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/HNSWSearchParams.java index 03de588..15a3064 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/HNSWSearchParams.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/HNSWSearchParams.java @@ -20,6 +20,8 @@ package com.tencent.tcvectordb.model.param.dml; +import com.tencent.tcvectordb.exception.ParamException; + /** * VectorDB HNSWSearchParams */ @@ -27,6 +29,9 @@ public class HNSWSearchParams implements Params { private int ef; public HNSWSearchParams(int ef) { + if (ef == 0){ + throw new ParamException("The value of ef cannot be 0"); + } this.ef = ef; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/MatchOption.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/MatchOption.java index 3cd8233..7543df8 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/MatchOption.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/MatchOption.java @@ -13,6 +13,8 @@ * fieldName: String, field name of the sparse vector field, value must be "sparse_vector". * data: List>>, sparse vector data, can user MatchOption.newBuilder().withData(List>>) to use sparse vector data. * Limit: Integer, search limit + * terminateAfter: Integer, search terminate after this number of documents. + * cutoffFrequency: Double, cutoff frequency. * eg: * MatchOption option = new MatchOption.Builder().withFieldName("sparse_vector").withData(sparseVector).build(); */ @@ -22,6 +24,9 @@ public class MatchOption { private List>> data; private Integer limit; + private Integer terminateAfter; + private Double cutoffFrequency; + public String getFieldName() { return fieldName; } @@ -46,10 +51,28 @@ public void setLimit(Integer limit) { this.limit = limit; } + public Integer getTerminateAfter() { + return terminateAfter; + } + + public void setTerminateAfter(Integer terminateAfter) { + this.terminateAfter = terminateAfter; + } + + public Double getCutoffFrequency() { + return cutoffFrequency; + } + + public void setCutoffFrequency(double cutoffFrequency) { + this.cutoffFrequency = cutoffFrequency; + } + public MatchOption(Builder builder) { this.fieldName = builder.fieldName; this.data = builder.data; this.limit = builder.limit; + this.terminateAfter = builder.terminateAfter; + this.cutoffFrequency = builder.cutoffFrequency; } public static Builder newBuilder() { @@ -61,6 +84,9 @@ public static final class Builder { private List>> data; private Integer limit; + private Integer terminateAfter; + private double cutoffFrequency; + private Builder() { } @@ -90,6 +116,16 @@ public Builder withLimit(Integer limit){ return this; } + public Builder withTerminateAfter(Integer terminateAfter){ + this.terminateAfter = terminateAfter; + return this; + } + + public Builder withCutoffFrequency(double cutoffFrequency){ + this.cutoffFrequency = cutoffFrequency; + return this; + } + public MatchOption build() { if (fieldName == null || data.isEmpty()){ throw new ParamException("RetrieveOption error: fieldName or data is null"); diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/ModifyVectorIndexParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/ModifyVectorIndexParam.java new file mode 100644 index 0000000..cbe27f8 --- /dev/null +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/ModifyVectorIndexParam.java @@ -0,0 +1,65 @@ +package com.tencent.tcvectordb.model.param.dml; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.tencent.tcvectordb.model.param.collection.IndexField; +import com.tencent.tcvectordb.model.param.collection.VectorIndex; + +import java.util.ArrayList; +import java.util.List; + +/** + * ModifyVectorIndexParam + * Currently, this method is only for dense vectors, i.e. vector + * Supports re-specifying vector index parameters, HNSW supports re-specifying M and efConstruction, IVF supports re-specifying nlist (IVF_PQ supports re-specifying M and nlist) + * Supports re-specifying similarity calculation method + * The new configuration after the vector index is modified is defined by the field vectorIndexes + * After adjusting the parameters, this interface will trigger a rebuild, and the rebuild rules are specified by the field rebuildRules + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ModifyVectorIndexParam { + private RebuildIndexParam rebuildRules; + private List vectorIndexes; + + public ModifyVectorIndexParam() { + } + + public ModifyVectorIndexParam(Builder builder) { + this.rebuildRules = builder.rebuildRules; + this.vectorIndexes = builder.vectorIndexes; + } + + public RebuildIndexParam getRebuildRules() { + return rebuildRules; + } + + public List getVectorIndexes() { + return vectorIndexes; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder { + private RebuildIndexParam rebuildRules; + private List vectorIndexes; + + private Builder() { + vectorIndexes = new ArrayList<>(); + } + + public Builder withRebuildRules(RebuildIndexParam rebuildRules) { + this.rebuildRules = rebuildRules; + return this; + } + + public Builder withVectorIndex(VectorIndex vectorIndex) { + this.vectorIndexes.add(vectorIndex); + return this; + } + + public ModifyVectorIndexParam build() { + return new ModifyVectorIndexParam(this); + } + } +} diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RRFRerankParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RRFRerankParam.java index 0966404..81c4594 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RRFRerankParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RRFRerankParam.java @@ -1,15 +1,19 @@ package com.tencent.tcvectordb.model.param.dml; import com.fasterxml.jackson.annotation.JsonInclude; +import com.tencent.tcvectordb.exception.ParamException; import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) public class RRFRerankParam extends RerankParam{ - private int rrfK; - public RRFRerankParam(int rrfK) { + private Integer rrfK = 60; + private RRFRerankParam(int rrfK) { super("rrf"); + if (rrfK == 0){ + throw new ParamException("The value of rrfK cannot be 0"); + } this.rrfK = rrfK; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RebuildIndexParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RebuildIndexParam.java index 946eb2a..c54564f 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RebuildIndexParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/RebuildIndexParam.java @@ -4,8 +4,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class RebuildIndexParam { - private boolean dropBeforeRebuild; - private int throttle; + private Boolean dropBeforeRebuild; + private Integer throttle; public RebuildIndexParam() { @@ -16,7 +16,7 @@ public RebuildIndexParam(Builder builder) { this.throttle = builder.throttle; } - public boolean dropBeforeRebuild() { + public Boolean getDropBeforeRebuild() { return dropBeforeRebuild; } @@ -30,7 +30,7 @@ public static Builder newBuilder() { public static final class Builder { private boolean dropBeforeRebuild = false; - private int throttle = 0; + private Integer throttle = 1; private Builder() { } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchByVectorParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchByVectorParam.java index 346d436..a11c41d 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchByVectorParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchByVectorParam.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * Search By Vector Param @@ -35,14 +36,14 @@ */ @JsonInclude(JsonInclude.Include.NON_NULL) public class SearchByVectorParam extends SearchParam { - private List> vectors; + private List> vectors; private SearchByVectorParam(Builder builder) { super(builder); this.vectors = builder.vectors; } - public List> getVectors() { + public List> getVectors() { return vectors; } @@ -51,19 +52,19 @@ public static Builder newBuilder() { } public static class Builder extends SearchParam.Builder { - private List> vectors; + private List> vectors; private Builder() { super(); this.vectors = new ArrayList<>(); } - public Builder withVectors(List> vectors) { - this.vectors = vectors; + public Builder withVectors(List> vectors) { + this.vectors = vectors.stream().collect(Collectors.toList()); return this; } - public Builder addVector(List vector) { + public Builder addVector(List vector) { this.vectors.add(vector); return this; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchParam.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchParam.java index e57aaa5..8d674b6 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchParam.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/dml/SearchParam.java @@ -79,6 +79,9 @@ public int getLimit() { return limit; } + public Float getRadius() { + return radius; + } protected static abstract class Builder> { protected Params params; @@ -126,5 +129,10 @@ public T withLimit(int limit) { this.limit = limit; return self(); } + + public T withRadius(Float radius) { + this.radius = radius; + return self(); + } } } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/entity/BaseRes.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/entity/BaseRes.java index af7dbbb..2d4fd66 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/entity/BaseRes.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/model/param/entity/BaseRes.java @@ -6,7 +6,7 @@ public class BaseRes { protected String msg; protected String warning; - protected int count; + protected long count; protected String requestId; @@ -19,6 +19,13 @@ public BaseRes(int code, String msg, String warning) { this.warning = warning; } + public BaseRes(int code, String msg, String warning, long count) { + this.code = code; + this.msg = msg; + this.warning = warning; + this.count = count; + } + public String getRequestId() { return requestId; } @@ -39,7 +46,7 @@ public String getWarning() { return warning; } - public int getCount() { + public long getCount() { return count; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/Olama.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/Olama.java index 97a4f3f..68071a9 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/Olama.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/Olama.java @@ -8651,6 +8651,12 @@ public interface DatabaseItemOrBuilder extends * @return The dbType. */ com.tencent.tcvectordb.rpc.proto.Olama.DataType getDbType(); + + /** + * int64 count = 3; + * @return The count. + */ + long getCount(); } /** * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.DatabaseItem} @@ -8717,6 +8723,17 @@ public long getCreateTime() { return result == null ? com.tencent.tcvectordb.rpc.proto.Olama.DataType.UNRECOGNIZED : result; } + public static final int COUNT_FIELD_NUMBER = 3; + private long count_ = 0L; + /** + * int64 count = 3; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -8737,6 +8754,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (dbType_ != com.tencent.tcvectordb.rpc.proto.Olama.DataType.BASE.getNumber()) { output.writeEnum(2, dbType_); } + if (count_ != 0L) { + output.writeInt64(3, count_); + } getUnknownFields().writeTo(output); } @@ -8754,6 +8774,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, dbType_); } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, count_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8772,6 +8796,8 @@ public boolean equals(final java.lang.Object obj) { if (getCreateTime() != other.getCreateTime()) return false; if (dbType_ != other.dbType_) return false; + if (getCount() + != other.getCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8788,6 +8814,9 @@ public int hashCode() { getCreateTime()); hash = (37 * hash) + DB_TYPE_FIELD_NUMBER; hash = (53 * hash) + dbType_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -8921,6 +8950,7 @@ public Builder clear() { bitField0_ = 0; createTime_ = 0L; dbType_ = 0; + count_ = 0L; return this; } @@ -8960,6 +8990,9 @@ private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.DatabaseItem r if (((from_bitField0_ & 0x00000002) != 0)) { result.dbType_ = dbType_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.count_ = count_; + } } @java.lang.Override @@ -9012,6 +9045,9 @@ public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.DatabaseItem oth if (other.dbType_ != 0) { setDbTypeValue(other.getDbTypeValue()); } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -9048,6 +9084,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 24: { + count_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -9149,6 +9190,38 @@ public Builder clearDbType() { onChanged(); return this; } + + private long count_ ; + /** + * int64 count = 3; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * int64 count = 3; + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int64 count = 3; + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000004); + count_ = 0L; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -55268,6 +55341,47 @@ com.tencent.tcvectordb.rpc.proto.Olama.VectorArrayOrBuilder getDataOrBuilder( */ com.google.protobuf.ByteString getDataExprBytes(int index); + + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @return A list containing the embeddingItems. + */ + java.util.List + getEmbeddingItemsList(); + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @return The count of embeddingItems. + */ + int getEmbeddingItemsCount(); + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @param index The index of the element to return. + * @return The embeddingItems at the given index. + */ + java.lang.String getEmbeddingItems(int index); + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @param index The index of the value to return. + * @return The bytes of the embeddingItems at the given index. + */ + com.google.protobuf.ByteString + getEmbeddingItemsBytes(int index); } /** * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AnnData} @@ -55288,6 +55402,8 @@ private AnnData() { com.google.protobuf.LazyStringArrayList.emptyList(); dataExpr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + embeddingItems_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -55578,6 +55694,59 @@ public java.lang.String getDataExpr(int index) { return dataExpr_.getByteString(index); } + public static final int EMBEDDINGITEMS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList embeddingItems_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @return A list containing the embeddingItems. + */ + public com.google.protobuf.ProtocolStringList + getEmbeddingItemsList() { + return embeddingItems_; + } + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @return The count of embeddingItems. + */ + public int getEmbeddingItemsCount() { + return embeddingItems_.size(); + } + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @param index The index of the element to return. + * @return The embeddingItems at the given index. + */ + public java.lang.String getEmbeddingItems(int index) { + return embeddingItems_.get(index); + } + /** + *
+     * 使用embedding字段检索
+     * 
+ * + * repeated string embeddingItems = 7; + * @param index The index of the value to return. + * @return The bytes of the embeddingItems at the given index. + */ + public com.google.protobuf.ByteString + getEmbeddingItemsBytes(int index) { + return embeddingItems_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -55610,6 +55779,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < dataExpr_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dataExpr_.getRaw(i)); } + for (int i = 0; i < embeddingItems_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, embeddingItems_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -55650,6 +55822,14 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDataExprList().size(); } + { + int dataSize = 0; + for (int i = 0; i < embeddingItems_.size(); i++) { + dataSize += computeStringSizeNoTag(embeddingItems_.getRaw(i)); + } + size += dataSize; + size += 1 * getEmbeddingItemsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -55680,6 +55860,8 @@ public boolean equals(final java.lang.Object obj) { != other.getLimit()) return false; if (!getDataExprList() .equals(other.getDataExprList())) return false; + if (!getEmbeddingItemsList() + .equals(other.getEmbeddingItemsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -55711,6 +55893,10 @@ public int hashCode() { hash = (37 * hash) + DATA_EXPR_FIELD_NUMBER; hash = (53 * hash) + getDataExprList().hashCode(); } + if (getEmbeddingItemsCount() > 0) { + hash = (37 * hash) + EMBEDDINGITEMS_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingItemsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -55867,6 +56053,8 @@ public Builder clear() { limit_ = 0; dataExpr_ = com.google.protobuf.LazyStringArrayList.emptyList(); + embeddingItems_ = + com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -55934,6 +56122,10 @@ private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AnnData result dataExpr_.makeImmutable(); result.dataExpr_ = dataExpr_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + embeddingItems_.makeImmutable(); + result.embeddingItems_ = embeddingItems_; + } result.bitField0_ |= to_bitField0_; } @@ -56038,6 +56230,16 @@ public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AnnData other) { } onChanged(); } + if (!other.embeddingItems_.isEmpty()) { + if (embeddingItems_.isEmpty()) { + embeddingItems_ = other.embeddingItems_; + bitField0_ |= 0x00000040; + } else { + ensureEmbeddingItemsIsMutable(); + embeddingItems_.addAll(other.embeddingItems_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -56106,6 +56308,12 @@ public Builder mergeFrom( dataExpr_.add(s); break; } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureEmbeddingItemsIsMutable(); + embeddingItems_.add(s); + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -57021,6 +57229,153 @@ public Builder addDataExprBytes( onChanged(); return this; } + + private com.google.protobuf.LazyStringArrayList embeddingItems_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureEmbeddingItemsIsMutable() { + if (!embeddingItems_.isModifiable()) { + embeddingItems_ = new com.google.protobuf.LazyStringArrayList(embeddingItems_); + } + bitField0_ |= 0x00000040; + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @return A list containing the embeddingItems. + */ + public com.google.protobuf.ProtocolStringList + getEmbeddingItemsList() { + embeddingItems_.makeImmutable(); + return embeddingItems_; + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @return The count of embeddingItems. + */ + public int getEmbeddingItemsCount() { + return embeddingItems_.size(); + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @param index The index of the element to return. + * @return The embeddingItems at the given index. + */ + public java.lang.String getEmbeddingItems(int index) { + return embeddingItems_.get(index); + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @param index The index of the value to return. + * @return The bytes of the embeddingItems at the given index. + */ + public com.google.protobuf.ByteString + getEmbeddingItemsBytes(int index) { + return embeddingItems_.getByteString(index); + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @param index The index to set the value at. + * @param value The embeddingItems to set. + * @return This builder for chaining. + */ + public Builder setEmbeddingItems( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEmbeddingItemsIsMutable(); + embeddingItems_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @param value The embeddingItems to add. + * @return This builder for chaining. + */ + public Builder addEmbeddingItems( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureEmbeddingItemsIsMutable(); + embeddingItems_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @param values The embeddingItems to add. + * @return This builder for chaining. + */ + public Builder addAllEmbeddingItems( + java.lang.Iterable values) { + ensureEmbeddingItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, embeddingItems_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @return This builder for chaining. + */ + public Builder clearEmbeddingItems() { + embeddingItems_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040);; + onChanged(); + return this; + } + /** + *
+       * 使用embedding字段检索
+       * 
+ * + * repeated string embeddingItems = 7; + * @param value The bytes of the embeddingItems to add. + * @return This builder for chaining. + */ + public Builder addEmbeddingItemsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureEmbeddingItemsIsMutable(); + embeddingItems_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -57944,6 +58299,33 @@ com.tencent.tcvectordb.rpc.proto.Olama.SparseVectorArrayOrBuilder getDataOrBuild * @return The limit. */ int getLimit(); + + /** + *
+     * 搜索参数
+     * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + * @return Whether the params field is set. + */ + boolean hasParams(); + /** + *
+     * 搜索参数
+     * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + * @return The params. + */ + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams getParams(); + /** + *
+     * 搜索参数
+     * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder getParamsOrBuilder(); } /** * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.SparseData} @@ -57982,6 +58364,7 @@ protected java.lang.Object newInstance( com.tencent.tcvectordb.rpc.proto.Olama.SparseData.class, com.tencent.tcvectordb.rpc.proto.Olama.SparseData.Builder.class); } + private int bitField0_; public static final int FIELDNAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object fieldName_ = ""; @@ -58105,6 +58488,44 @@ public int getLimit() { return limit_; } + public static final int PARAMS_FIELD_NUMBER = 4; + private com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams params_; + /** + *
+     * 搜索参数
+     * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + * @return Whether the params field is set. + */ + @java.lang.Override + public boolean hasParams() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * 搜索参数
+     * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + * @return The params. + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams getParams() { + return params_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance() : params_; + } + /** + *
+     * 搜索参数
+     * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder getParamsOrBuilder() { + return params_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance() : params_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -58128,6 +58549,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (limit_ != 0) { output.writeUInt32(3, limit_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getParams()); + } getUnknownFields().writeTo(output); } @@ -58148,6 +58572,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, limit_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getParams()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -58169,6 +58597,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getDataList())) return false; if (getLimit() != other.getLimit()) return false; + if (hasParams() != other.hasParams()) return false; + if (hasParams()) { + if (!getParams() + .equals(other.getParams())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -58188,6 +58621,10 @@ public int hashCode() { } hash = (37 * hash) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + getLimit(); + if (hasParams()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParams().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -58307,13 +58744,20 @@ public static final class Builder extends // Construct using com.tencent.tcvectordb.rpc.proto.Olama.SparseData.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDataFieldBuilder(); + getParamsFieldBuilder(); + } } @java.lang.Override public Builder clear() { @@ -58328,6 +58772,11 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000002); limit_ = 0; + params_ = null; + if (paramsBuilder_ != null) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + } return this; } @@ -58380,6 +58829,14 @@ private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.SparseData res if (((from_bitField0_ & 0x00000004) != 0)) { result.limit_ = limit_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.params_ = paramsBuilder_ == null + ? params_ + : paramsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -58460,6 +58917,9 @@ public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.SparseData other if (other.getLimit() != 0) { setLimit(other.getLimit()); } + if (other.hasParams()) { + mergeParams(other.getParams()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -58509,6 +58969,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 24 + case 34: { + input.readMessage( + getParamsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -58973,6 +59440,163 @@ public Builder clearLimit() { onChanged(); return this; } + + private com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams params_; + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder> paramsBuilder_; + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + * @return Whether the params field is set. + */ + public boolean hasParams() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + * @return The params. + */ + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams getParams() { + if (paramsBuilder_ == null) { + return params_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance() : params_; + } else { + return paramsBuilder_.getMessage(); + } + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + public Builder setParams(com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + params_ = value; + } else { + paramsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + public Builder setParams( + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder builderForValue) { + if (paramsBuilder_ == null) { + params_ = builderForValue.build(); + } else { + paramsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + public Builder mergeParams(com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams value) { + if (paramsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + params_ != null && + params_ != com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance()) { + getParamsBuilder().mergeFrom(value); + } else { + params_ = value; + } + } else { + paramsBuilder_.mergeFrom(value); + } + if (params_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + public Builder clearParams() { + bitField0_ = (bitField0_ & ~0x00000008); + params_ = null; + if (paramsBuilder_ != null) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder getParamsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getParamsFieldBuilder().getBuilder(); + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder getParamsOrBuilder() { + if (paramsBuilder_ != null) { + return paramsBuilder_.getMessageOrBuilder(); + } else { + return params_ == null ? + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance() : params_; + } + } + /** + *
+       * 搜索参数
+       * 
+ * + * .com.tencent.tcvectordb.rpc.proto.SparseSearchParams params = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder> + getParamsFieldBuilder() { + if (paramsBuilder_ == null) { + paramsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder>( + getParams(), + getParentForChildren(), + isClean()); + params_ = null; + } + return paramsBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -77759,58 +78383,6694 @@ public interface AddIndexRequestOrBuilder extends getCollectionBytes(); /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - int getIndexesCount(); - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - boolean containsIndexes( - java.lang.String key); - /** - * Use {@link #getIndexesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getIndexes(); - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - java.util.Map - getIndexesMap(); - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + int getIndexesCount(); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + boolean containsIndexes( + java.lang.String key); + /** + * Use {@link #getIndexesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getIndexes(); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + java.util.Map + getIndexesMap(); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrDefault( + java.lang.String key, + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrThrow( + java.lang.String key); + + /** + * bool buildExistedData = 4; + * @return The buildExistedData. + */ + boolean getBuildExistedData(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexRequest} + */ + public static final class AddIndexRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) + AddIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddIndexRequest.newBuilder() to construct. + private AddIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AddIndexRequest() { + database_ = ""; + collection_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AddIndexRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetIndexes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + /** + * string database = 1; + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + /** + * string database = 1; + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + * string collection = 2; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + * string collection = 2; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEXES_FIELD_NUMBER = 3; + private static final class IndexesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_IndexesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn> indexes_; + private com.google.protobuf.MapField + internalGetIndexes() { + if (indexes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IndexesDefaultEntryHolder.defaultEntry); + } + return indexes_; + } + public int getIndexesCount() { + return internalGetIndexes().getMap().size(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public boolean containsIndexes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetIndexes().getMap().containsKey(key); + } + /** + * Use {@link #getIndexesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getIndexes() { + return getIndexesMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public java.util.Map getIndexesMap() { + return internalGetIndexes().getMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrDefault( + java.lang.String key, + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetIndexes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetIndexes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BUILDEXISTEDDATA_FIELD_NUMBER = 4; + private boolean buildExistedData_ = false; + /** + * bool buildExistedData = 4; + * @return The buildExistedData. + */ + @java.lang.Override + public boolean getBuildExistedData() { + return buildExistedData_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetIndexes(), + IndexesDefaultEntryHolder.defaultEntry, + 3); + if (buildExistedData_ != false) { + output.writeBool(4, buildExistedData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); + } + for (java.util.Map.Entry entry + : internalGetIndexes().getMap().entrySet()) { + com.google.protobuf.MapEntry + indexes__ = IndexesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, indexes__); + } + if (buildExistedData_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, buildExistedData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest other = (com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest) obj; + + if (!getDatabase() + .equals(other.getDatabase())) return false; + if (!getCollection() + .equals(other.getCollection())) return false; + if (!internalGetIndexes().equals( + other.internalGetIndexes())) return false; + if (getBuildExistedData() + != other.getBuildExistedData()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + if (!internalGetIndexes().getMap().isEmpty()) { + hash = (37 * hash) + INDEXES_FIELD_NUMBER; + hash = (53 * hash) + internalGetIndexes().hashCode(); + } + hash = (37 * hash) + BUILDEXISTEDDATA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBuildExistedData()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetIndexes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableIndexes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + database_ = ""; + collection_ = ""; + internalGetMutableIndexes().clear(); + buildExistedData_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest build() { + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest result = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.indexes_ = internalGetIndexes().build(IndexesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.buildExistedData_ = buildExistedData_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.getDefaultInstance()) return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableIndexes().mergeFrom( + other.internalGetIndexes()); + bitField0_ |= 0x00000004; + if (other.getBuildExistedData() != false) { + setBuildExistedData(other.getBuildExistedData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + indexes__ = input.readMessage( + IndexesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableIndexes().ensureBuilderMap().put( + indexes__.getKey(), indexes__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + buildExistedData_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object database_ = ""; + /** + * string database = 1; + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string database = 1; + * @return The bytes for database. + */ + public com.google.protobuf.ByteString + getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string database = 1; + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string database = 1; + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string database = 1; + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object collection_ = ""; + /** + * string collection = 2; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string collection = 2; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string collection = 2; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string collection = 2; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string collection = 2; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private static final class IndexesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn build(com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder val) { + if (val instanceof com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) { return (com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) val; } + return ((com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return IndexesDefaultEntryHolder.defaultEntry; + } + }; + private static final IndexesConverter indexesConverter = new IndexesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder> indexes_; + private com.google.protobuf.MapFieldBuilder + internalGetIndexes() { + if (indexes_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(indexesConverter); + } + return indexes_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableIndexes() { + if (indexes_ == null) { + indexes_ = new com.google.protobuf.MapFieldBuilder<>(indexesConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return indexes_; + } + public int getIndexesCount() { + return internalGetIndexes().ensureBuilderMap().size(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public boolean containsIndexes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetIndexes().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getIndexesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getIndexes() { + return getIndexesMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public java.util.Map getIndexesMap() { + return internalGetIndexes().getImmutableMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrDefault( + java.lang.String key, + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableIndexes().ensureBuilderMap(); + return map.containsKey(key) ? indexesConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableIndexes().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return indexesConverter.build(map.get(key)); + } + public Builder clearIndexes() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableIndexes().clear(); + return this; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + public Builder removeIndexes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableIndexes().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableIndexes() { + bitField0_ |= 0x00000004; + return internalGetMutableIndexes().ensureMessageMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + public Builder putIndexes( + java.lang.String key, + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableIndexes().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + public Builder putAllIndexes( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableIndexes().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder putIndexesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableIndexes().ensureBuilderMap(); + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) { + entry = ((com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder) entry; + } + + private boolean buildExistedData_ ; + /** + * bool buildExistedData = 4; + * @return The buildExistedData. + */ + @java.lang.Override + public boolean getBuildExistedData() { + return buildExistedData_; + } + /** + * bool buildExistedData = 4; + * @param value The buildExistedData to set. + * @return This builder for chaining. + */ + public Builder setBuildExistedData(boolean value) { + + buildExistedData_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool buildExistedData = 4; + * @return This builder for chaining. + */ + public Builder clearBuildExistedData() { + bitField0_ = (bitField0_ & ~0x00000008); + buildExistedData_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) + private static final com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AddIndexResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * string redirect = 3; + * @return The redirect. + */ + java.lang.String getRedirect(); + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + com.google.protobuf.ByteString + getRedirectBytes(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexResponse} + */ + public static final class AddIndexResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + AddIndexResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddIndexResponse.newBuilder() to construct. + private AddIndexResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AddIndexResponse() { + msg_ = ""; + redirect_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AddIndexResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * int32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REDIRECT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object redirect_ = ""; + /** + * string redirect = 3; + * @return The redirect. + */ + @java.lang.Override + public java.lang.String getRedirect() { + java.lang.Object ref = redirect_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirect_ = s; + return s; + } + } + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRedirectBytes() { + java.lang.Object ref = redirect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + redirect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, redirect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, redirect_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse other = (com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getRedirect() + .equals(other.getRedirect())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + REDIRECT_FIELD_NUMBER; + hash = (53 * hash) + getRedirect().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + redirect_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse build() { + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse result = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.redirect_ = redirect_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRedirect().isEmpty()) { + redirect_ = other.redirect_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + redirect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * int32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * int32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object redirect_ = ""; + /** + * string redirect = 3; + * @return The redirect. + */ + public java.lang.String getRedirect() { + java.lang.Object ref = redirect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + public com.google.protobuf.ByteString + getRedirectBytes() { + java.lang.Object ref = redirect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + redirect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string redirect = 3; + * @param value The redirect to set. + * @return This builder for chaining. + */ + public Builder setRedirect( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + redirect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string redirect = 3; + * @return This builder for chaining. + */ + public Builder clearRedirect() { + redirect_ = getDefaultInstance().getRedirect(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string redirect = 3; + * @param value The bytes for redirect to set. + * @return This builder for chaining. + */ + public Builder setRedirectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + redirect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + private static final com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddIndexResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExplainRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.ExplainRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string database = 1; + * @return The database. + */ + java.lang.String getDatabase(); + /** + * string database = 1; + * @return The bytes for database. + */ + com.google.protobuf.ByteString + getDatabaseBytes(); + + /** + * string collection = 2; + * @return The collection. + */ + java.lang.String getCollection(); + /** + * string collection = 2; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return The query. + */ + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond getQuery(); + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder getQueryOrBuilder(); + + /** + * string readConsistency = 4; + * @return The readConsistency. + */ + java.lang.String getReadConsistency(); + /** + * string readConsistency = 4; + * @return The bytes for readConsistency. + */ + com.google.protobuf.ByteString + getReadConsistencyBytes(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ExplainRequest} + */ + public static final class ExplainRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.ExplainRequest) + ExplainRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplainRequest.newBuilder() to construct. + private ExplainRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExplainRequest() { + database_ = ""; + collection_ = ""; + readConsistency_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExplainRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.Builder.class); + } + + private int bitField0_; + public static final int DATABASE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + /** + * string database = 1; + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + /** + * string database = 1; + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + * string collection = 2; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + * string collection = 2; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 3; + private com.tencent.tcvectordb.rpc.proto.Olama.QueryCond query_; + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return The query. + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCond getQuery() { + return query_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder getQueryOrBuilder() { + return query_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; + } + + public static final int READCONSISTENCY_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object readConsistency_ = ""; + /** + * string readConsistency = 4; + * @return The readConsistency. + */ + @java.lang.Override + public java.lang.String getReadConsistency() { + java.lang.Object ref = readConsistency_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + readConsistency_ = s; + return s; + } + } + /** + * string readConsistency = 4; + * @return The bytes for readConsistency. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReadConsistencyBytes() { + java.lang.Object ref = readConsistency_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + readConsistency_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(readConsistency_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, readConsistency_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(readConsistency_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, readConsistency_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest other = (com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest) obj; + + if (!getDatabase() + .equals(other.getDatabase())) return false; + if (!getCollection() + .equals(other.getCollection())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery() + .equals(other.getQuery())) return false; + } + if (!getReadConsistency() + .equals(other.getReadConsistency())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + READCONSISTENCY_FIELD_NUMBER; + hash = (53 * hash) + getReadConsistency().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ExplainRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.ExplainRequest) + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQueryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + database_ = ""; + collection_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + readConsistency_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest build() { + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest result = new com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.collection_ = collection_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = queryBuilder_ == null + ? query_ + : queryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.readConsistency_ = readConsistency_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.getDefaultInstance()) return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (!other.getReadConsistency().isEmpty()) { + readConsistency_ = other.readConsistency_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getQueryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + readConsistency_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object database_ = ""; + /** + * string database = 1; + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string database = 1; + * @return The bytes for database. + */ + public com.google.protobuf.ByteString + getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string database = 1; + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string database = 1; + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string database = 1; + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object collection_ = ""; + /** + * string collection = 2; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string collection = 2; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string collection = 2; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string collection = 2; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string collection = 2; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.tencent.tcvectordb.rpc.proto.Olama.QueryCond query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond, com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder, com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder> queryBuilder_; + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return The query. + */ + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCond getQuery() { + if (queryBuilder_ == null) { + return query_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + public Builder setQuery(com.tencent.tcvectordb.rpc.proto.Olama.QueryCond value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + public Builder setQuery( + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + public Builder mergeQuery(com.tencent.tcvectordb.rpc.proto.Olama.QueryCond value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + query_ != null && + query_ != com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + if (query_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000004); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder getQueryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null ? + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; + } + } + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond, com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder, com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond, com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder, com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder>( + getQuery(), + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; + } + + private java.lang.Object readConsistency_ = ""; + /** + * string readConsistency = 4; + * @return The readConsistency. + */ + public java.lang.String getReadConsistency() { + java.lang.Object ref = readConsistency_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + readConsistency_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string readConsistency = 4; + * @return The bytes for readConsistency. + */ + public com.google.protobuf.ByteString + getReadConsistencyBytes() { + java.lang.Object ref = readConsistency_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + readConsistency_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string readConsistency = 4; + * @param value The readConsistency to set. + * @return This builder for chaining. + */ + public Builder setReadConsistency( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + readConsistency_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string readConsistency = 4; + * @return This builder for chaining. + */ + public Builder clearReadConsistency() { + readConsistency_ = getDefaultInstance().getReadConsistency(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string readConsistency = 4; + * @param value The bytes for readConsistency to set. + * @return This builder for chaining. + */ + public Builder setReadConsistencyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + readConsistency_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.ExplainRequest) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.ExplainRequest) + private static final com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExplainRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExplainResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.ExplainResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * string redirect = 3; + * @return The redirect. + */ + java.lang.String getRedirect(); + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + com.google.protobuf.ByteString + getRedirectBytes(); + + /** + * repeated uint64 affectedTable = 4; + * @return A list containing the affectedTable. + */ + java.util.List getAffectedTableList(); + /** + * repeated uint64 affectedTable = 4; + * @return The count of affectedTable. + */ + int getAffectedTableCount(); + /** + * repeated uint64 affectedTable = 4; + * @param index The index of the element to return. + * @return The affectedTable at the given index. + */ + long getAffectedTable(int index); + + /** + * uint64 affectedCount = 5; + * @return The affectedCount. + */ + long getAffectedCount(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ExplainResponse} + */ + public static final class ExplainResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.ExplainResponse) + ExplainResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExplainResponse.newBuilder() to construct. + private ExplainResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExplainResponse() { + msg_ = ""; + redirect_ = ""; + affectedTable_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExplainResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * int32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REDIRECT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object redirect_ = ""; + /** + * string redirect = 3; + * @return The redirect. + */ + @java.lang.Override + public java.lang.String getRedirect() { + java.lang.Object ref = redirect_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirect_ = s; + return s; + } + } + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRedirectBytes() { + java.lang.Object ref = redirect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + redirect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AFFECTEDTABLE_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList affectedTable_ = + emptyLongList(); + /** + * repeated uint64 affectedTable = 4; + * @return A list containing the affectedTable. + */ + @java.lang.Override + public java.util.List + getAffectedTableList() { + return affectedTable_; + } + /** + * repeated uint64 affectedTable = 4; + * @return The count of affectedTable. + */ + public int getAffectedTableCount() { + return affectedTable_.size(); + } + /** + * repeated uint64 affectedTable = 4; + * @param index The index of the element to return. + * @return The affectedTable at the given index. + */ + public long getAffectedTable(int index) { + return affectedTable_.getLong(index); + } + private int affectedTableMemoizedSerializedSize = -1; + + public static final int AFFECTEDCOUNT_FIELD_NUMBER = 5; + private long affectedCount_ = 0L; + /** + * uint64 affectedCount = 5; + * @return The affectedCount. + */ + @java.lang.Override + public long getAffectedCount() { + return affectedCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (code_ != 0) { + output.writeInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, redirect_); + } + if (getAffectedTableList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(affectedTableMemoizedSerializedSize); + } + for (int i = 0; i < affectedTable_.size(); i++) { + output.writeUInt64NoTag(affectedTable_.getLong(i)); + } + if (affectedCount_ != 0L) { + output.writeUInt64(5, affectedCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, redirect_); + } + { + int dataSize = 0; + for (int i = 0; i < affectedTable_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(affectedTable_.getLong(i)); + } + size += dataSize; + if (!getAffectedTableList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + affectedTableMemoizedSerializedSize = dataSize; + } + if (affectedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, affectedCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse other = (com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getRedirect() + .equals(other.getRedirect())) return false; + if (!getAffectedTableList() + .equals(other.getAffectedTableList())) return false; + if (getAffectedCount() + != other.getAffectedCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + REDIRECT_FIELD_NUMBER; + hash = (53 * hash) + getRedirect().hashCode(); + if (getAffectedTableCount() > 0) { + hash = (37 * hash) + AFFECTEDTABLE_FIELD_NUMBER; + hash = (53 * hash) + getAffectedTableList().hashCode(); + } + hash = (37 * hash) + AFFECTEDCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAffectedCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ExplainResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.ExplainResponse) + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + redirect_ = ""; + affectedTable_ = emptyLongList(); + affectedCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse build() { + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse result = new com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.redirect_ = redirect_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + affectedTable_.makeImmutable(); + result.affectedTable_ = affectedTable_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.affectedCount_ = affectedCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRedirect().isEmpty()) { + redirect_ = other.redirect_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.affectedTable_.isEmpty()) { + if (affectedTable_.isEmpty()) { + affectedTable_ = other.affectedTable_; + affectedTable_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureAffectedTableIsMutable(); + affectedTable_.addAll(other.affectedTable_); + } + onChanged(); + } + if (other.getAffectedCount() != 0L) { + setAffectedCount(other.getAffectedCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + redirect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + long v = input.readUInt64(); + ensureAffectedTableIsMutable(); + affectedTable_.addLong(v); + break; + } // case 32 + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAffectedTableIsMutable(); + while (input.getBytesUntilLimit() > 0) { + affectedTable_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 34 + case 40: { + affectedCount_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * int32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * int32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object redirect_ = ""; + /** + * string redirect = 3; + * @return The redirect. + */ + public java.lang.String getRedirect() { + java.lang.Object ref = redirect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + public com.google.protobuf.ByteString + getRedirectBytes() { + java.lang.Object ref = redirect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + redirect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string redirect = 3; + * @param value The redirect to set. + * @return This builder for chaining. + */ + public Builder setRedirect( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + redirect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string redirect = 3; + * @return This builder for chaining. + */ + public Builder clearRedirect() { + redirect_ = getDefaultInstance().getRedirect(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string redirect = 3; + * @param value The bytes for redirect to set. + * @return This builder for chaining. + */ + public Builder setRedirectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + redirect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList affectedTable_ = emptyLongList(); + private void ensureAffectedTableIsMutable() { + if (!affectedTable_.isModifiable()) { + affectedTable_ = makeMutableCopy(affectedTable_); + } + bitField0_ |= 0x00000008; + } + /** + * repeated uint64 affectedTable = 4; + * @return A list containing the affectedTable. + */ + public java.util.List + getAffectedTableList() { + affectedTable_.makeImmutable(); + return affectedTable_; + } + /** + * repeated uint64 affectedTable = 4; + * @return The count of affectedTable. + */ + public int getAffectedTableCount() { + return affectedTable_.size(); + } + /** + * repeated uint64 affectedTable = 4; + * @param index The index of the element to return. + * @return The affectedTable at the given index. + */ + public long getAffectedTable(int index) { + return affectedTable_.getLong(index); + } + /** + * repeated uint64 affectedTable = 4; + * @param index The index to set the value at. + * @param value The affectedTable to set. + * @return This builder for chaining. + */ + public Builder setAffectedTable( + int index, long value) { + + ensureAffectedTableIsMutable(); + affectedTable_.setLong(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * repeated uint64 affectedTable = 4; + * @param value The affectedTable to add. + * @return This builder for chaining. + */ + public Builder addAffectedTable(long value) { + + ensureAffectedTableIsMutable(); + affectedTable_.addLong(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * repeated uint64 affectedTable = 4; + * @param values The affectedTable to add. + * @return This builder for chaining. + */ + public Builder addAllAffectedTable( + java.lang.Iterable values) { + ensureAffectedTableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, affectedTable_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * repeated uint64 affectedTable = 4; + * @return This builder for chaining. + */ + public Builder clearAffectedTable() { + affectedTable_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private long affectedCount_ ; + /** + * uint64 affectedCount = 5; + * @return The affectedCount. + */ + @java.lang.Override + public long getAffectedCount() { + return affectedCount_; + } + /** + * uint64 affectedCount = 5; + * @param value The affectedCount to set. + * @return This builder for chaining. + */ + public Builder setAffectedCount(long value) { + + affectedCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * uint64 affectedCount = 5; + * @return This builder for chaining. + */ + public Builder clearAffectedCount() { + bitField0_ = (bitField0_ & ~0x00000010); + affectedCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.ExplainResponse) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.ExplainResponse) + private static final com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExplainResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SparseSearchParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.SparseSearchParams) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 搜索到指定数量的结果就终止
+     * 
+ * + * uint32 terminateAfter = 1; + * @return The terminateAfter. + */ + int getTerminateAfter(); + + /** + *
+     * 全文检索时过滤掉高频词
+     * 
+ * + * double cutoffFrequency = 2; + * @return The cutoffFrequency. + */ + double getCutoffFrequency(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.SparseSearchParams} + */ + public static final class SparseSearchParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.SparseSearchParams) + SparseSearchParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SparseSearchParams.newBuilder() to construct. + private SparseSearchParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SparseSearchParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SparseSearchParams(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.class, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder.class); + } + + public static final int TERMINATEAFTER_FIELD_NUMBER = 1; + private int terminateAfter_ = 0; + /** + *
+     * 搜索到指定数量的结果就终止
+     * 
+ * + * uint32 terminateAfter = 1; + * @return The terminateAfter. + */ + @java.lang.Override + public int getTerminateAfter() { + return terminateAfter_; + } + + public static final int CUTOFFFREQUENCY_FIELD_NUMBER = 2; + private double cutoffFrequency_ = 0D; + /** + *
+     * 全文检索时过滤掉高频词
+     * 
+ * + * double cutoffFrequency = 2; + * @return The cutoffFrequency. + */ + @java.lang.Override + public double getCutoffFrequency() { + return cutoffFrequency_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (terminateAfter_ != 0) { + output.writeUInt32(1, terminateAfter_); + } + if (java.lang.Double.doubleToRawLongBits(cutoffFrequency_) != 0) { + output.writeDouble(2, cutoffFrequency_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (terminateAfter_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, terminateAfter_); + } + if (java.lang.Double.doubleToRawLongBits(cutoffFrequency_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, cutoffFrequency_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams other = (com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams) obj; + + if (getTerminateAfter() + != other.getTerminateAfter()) return false; + if (java.lang.Double.doubleToLongBits(getCutoffFrequency()) + != java.lang.Double.doubleToLongBits( + other.getCutoffFrequency())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TERMINATEAFTER_FIELD_NUMBER; + hash = (53 * hash) + getTerminateAfter(); + hash = (37 * hash) + CUTOFFFREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCutoffFrequency())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.SparseSearchParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.SparseSearchParams) + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.class, com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + terminateAfter_ = 0; + cutoffFrequency_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams build() { + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams result = new com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.terminateAfter_ = terminateAfter_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cutoffFrequency_ = cutoffFrequency_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams.getDefaultInstance()) return this; + if (other.getTerminateAfter() != 0) { + setTerminateAfter(other.getTerminateAfter()); + } + if (other.getCutoffFrequency() != 0D) { + setCutoffFrequency(other.getCutoffFrequency()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + terminateAfter_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: { + cutoffFrequency_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int terminateAfter_ ; + /** + *
+       * 搜索到指定数量的结果就终止
+       * 
+ * + * uint32 terminateAfter = 1; + * @return The terminateAfter. + */ + @java.lang.Override + public int getTerminateAfter() { + return terminateAfter_; + } + /** + *
+       * 搜索到指定数量的结果就终止
+       * 
+ * + * uint32 terminateAfter = 1; + * @param value The terminateAfter to set. + * @return This builder for chaining. + */ + public Builder setTerminateAfter(int value) { + + terminateAfter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * 搜索到指定数量的结果就终止
+       * 
+ * + * uint32 terminateAfter = 1; + * @return This builder for chaining. + */ + public Builder clearTerminateAfter() { + bitField0_ = (bitField0_ & ~0x00000001); + terminateAfter_ = 0; + onChanged(); + return this; + } + + private double cutoffFrequency_ ; + /** + *
+       * 全文检索时过滤掉高频词
+       * 
+ * + * double cutoffFrequency = 2; + * @return The cutoffFrequency. + */ + @java.lang.Override + public double getCutoffFrequency() { + return cutoffFrequency_; + } + /** + *
+       * 全文检索时过滤掉高频词
+       * 
+ * + * double cutoffFrequency = 2; + * @param value The cutoffFrequency to set. + * @return This builder for chaining. + */ + public Builder setCutoffFrequency(double value) { + + cutoffFrequency_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * 全文检索时过滤掉高频词
+       * 
+ * + * double cutoffFrequency = 2; + * @return This builder for chaining. + */ + public Builder clearCutoffFrequency() { + bitField0_ = (bitField0_ & ~0x00000002); + cutoffFrequency_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.SparseSearchParams) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.SparseSearchParams) + private static final com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SparseSearchParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.SparseSearchParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ModifyVectorIndexRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string database = 1; + * @return The database. + */ + java.lang.String getDatabase(); + /** + * string database = 1; + * @return The bytes for database. + */ + com.google.protobuf.ByteString + getDatabaseBytes(); + + /** + * string collection = 2; + * @return The collection. + */ + java.lang.String getCollection(); + /** + * string collection = 2; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + int getVectorIndexesCount(); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + boolean containsVectorIndexes( + java.lang.String key); + /** + * Use {@link #getVectorIndexesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getVectorIndexes(); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + java.util.Map + getVectorIndexesMap(); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getVectorIndexesOrDefault( + java.lang.String key, + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue); + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getVectorIndexesOrThrow( + java.lang.String key); + + /** + * bool rebuild = 4; + * @return The rebuild. + */ + boolean getRebuild(); + + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + * @return Whether the rebuildRules field is set. + */ + boolean hasRebuildRules(); + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + * @return The rebuildRules. + */ + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest getRebuildRules(); + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequestOrBuilder getRebuildRulesOrBuilder(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest} + */ + public static final class ModifyVectorIndexRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest) + ModifyVectorIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModifyVectorIndexRequest.newBuilder() to construct. + private ModifyVectorIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ModifyVectorIndexRequest() { + database_ = ""; + collection_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ModifyVectorIndexRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetVectorIndexes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.Builder.class); + } + + private int bitField0_; + public static final int DATABASE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + /** + * string database = 1; + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + /** + * string database = 1; + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + * string collection = 2; + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } + } + /** + * string collection = 2; + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VECTORINDEXES_FIELD_NUMBER = 3; + private static final class VectorIndexesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_VectorIndexesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn> vectorIndexes_; + private com.google.protobuf.MapField + internalGetVectorIndexes() { + if (vectorIndexes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + VectorIndexesDefaultEntryHolder.defaultEntry); + } + return vectorIndexes_; + } + public int getVectorIndexesCount() { + return internalGetVectorIndexes().getMap().size(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public boolean containsVectorIndexes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVectorIndexes().getMap().containsKey(key); + } + /** + * Use {@link #getVectorIndexesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVectorIndexes() { + return getVectorIndexesMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public java.util.Map getVectorIndexesMap() { + return internalGetVectorIndexes().getMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getVectorIndexesOrDefault( + java.lang.String key, + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVectorIndexes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getVectorIndexesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetVectorIndexes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int REBUILD_FIELD_NUMBER = 4; + private boolean rebuild_ = false; + /** + * bool rebuild = 4; + * @return The rebuild. + */ + @java.lang.Override + public boolean getRebuild() { + return rebuild_; + } + + public static final int REBUILDRULES_FIELD_NUMBER = 5; + private com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest rebuildRules_; + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + * @return Whether the rebuildRules field is set. + */ + @java.lang.Override + public boolean hasRebuildRules() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + * @return The rebuildRules. + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest getRebuildRules() { + return rebuildRules_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.getDefaultInstance() : rebuildRules_; + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequestOrBuilder getRebuildRulesOrBuilder() { + return rebuildRules_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.getDefaultInstance() : rebuildRules_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetVectorIndexes(), + VectorIndexesDefaultEntryHolder.defaultEntry, + 3); + if (rebuild_ != false) { + output.writeBool(4, rebuild_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getRebuildRules()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); + } + for (java.util.Map.Entry entry + : internalGetVectorIndexes().getMap().entrySet()) { + com.google.protobuf.MapEntry + vectorIndexes__ = VectorIndexesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, vectorIndexes__); + } + if (rebuild_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, rebuild_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getRebuildRules()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest other = (com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest) obj; + + if (!getDatabase() + .equals(other.getDatabase())) return false; + if (!getCollection() + .equals(other.getCollection())) return false; + if (!internalGetVectorIndexes().equals( + other.internalGetVectorIndexes())) return false; + if (getRebuild() + != other.getRebuild()) return false; + if (hasRebuildRules() != other.hasRebuildRules()) return false; + if (hasRebuildRules()) { + if (!getRebuildRules() + .equals(other.getRebuildRules())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + if (!internalGetVectorIndexes().getMap().isEmpty()) { + hash = (37 * hash) + VECTORINDEXES_FIELD_NUMBER; + hash = (53 * hash) + internalGetVectorIndexes().hashCode(); + } + hash = (37 * hash) + REBUILD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRebuild()); + if (hasRebuildRules()) { + hash = (37 * hash) + REBUILDRULES_FIELD_NUMBER; + hash = (53 * hash) + getRebuildRules().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest) + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetVectorIndexes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableVectorIndexes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRebuildRulesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + database_ = ""; + collection_ = ""; + internalGetMutableVectorIndexes().clear(); + rebuild_ = false; + rebuildRules_ = null; + if (rebuildRulesBuilder_ != null) { + rebuildRulesBuilder_.dispose(); + rebuildRulesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest build() { + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest result = new com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vectorIndexes_ = internalGetVectorIndexes().build(VectorIndexesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rebuild_ = rebuild_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rebuildRules_ = rebuildRulesBuilder_ == null + ? rebuildRules_ + : rebuildRulesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.getDefaultInstance()) return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableVectorIndexes().mergeFrom( + other.internalGetVectorIndexes()); + bitField0_ |= 0x00000004; + if (other.getRebuild() != false) { + setRebuild(other.getRebuild()); + } + if (other.hasRebuildRules()) { + mergeRebuildRules(other.getRebuildRules()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + vectorIndexes__ = input.readMessage( + VectorIndexesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableVectorIndexes().ensureBuilderMap().put( + vectorIndexes__.getKey(), vectorIndexes__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + rebuild_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getRebuildRulesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object database_ = ""; + /** + * string database = 1; + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string database = 1; + * @return The bytes for database. + */ + public com.google.protobuf.ByteString + getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string database = 1; + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string database = 1; + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string database = 1; + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object collection_ = ""; + /** + * string collection = 2; + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string collection = 2; + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString + getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string collection = 2; + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string collection = 2; + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string collection = 2; + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private static final class VectorIndexesConverter implements com.google.protobuf.MapFieldBuilder.Converter { + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn build(com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder val) { + if (val instanceof com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) { return (com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) val; } + return ((com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return VectorIndexesDefaultEntryHolder.defaultEntry; + } + }; + private static final VectorIndexesConverter vectorIndexesConverter = new VectorIndexesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder> vectorIndexes_; + private com.google.protobuf.MapFieldBuilder + internalGetVectorIndexes() { + if (vectorIndexes_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(vectorIndexesConverter); + } + return vectorIndexes_; + } + private com.google.protobuf.MapFieldBuilder + internalGetMutableVectorIndexes() { + if (vectorIndexes_ == null) { + vectorIndexes_ = new com.google.protobuf.MapFieldBuilder<>(vectorIndexesConverter); + } + bitField0_ |= 0x00000004; + onChanged(); + return vectorIndexes_; + } + public int getVectorIndexesCount() { + return internalGetVectorIndexes().ensureBuilderMap().size(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public boolean containsVectorIndexes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetVectorIndexes().ensureBuilderMap().containsKey(key); + } + /** + * Use {@link #getVectorIndexesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getVectorIndexes() { + return getVectorIndexesMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public java.util.Map getVectorIndexesMap() { + return internalGetVectorIndexes().getImmutableMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getVectorIndexesOrDefault( + java.lang.String key, + /* nullable */ +com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableVectorIndexes().ensureBuilderMap(); + return map.containsKey(key) ? vectorIndexesConverter.build(map.get(key)) : defaultValue; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getVectorIndexesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = internalGetMutableVectorIndexes().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return vectorIndexesConverter.build(map.get(key)); + } + public Builder clearVectorIndexes() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableVectorIndexes().clear(); + return this; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + public Builder removeVectorIndexes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableVectorIndexes().ensureBuilderMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableVectorIndexes() { + bitField0_ |= 0x00000004; + return internalGetMutableVectorIndexes().ensureMessageMap(); + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + public Builder putVectorIndexes( + java.lang.String key, + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableVectorIndexes().ensureBuilderMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + public Builder putAllVectorIndexes( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableVectorIndexes().ensureBuilderMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + /** + * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> vectorIndexes = 3; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder putVectorIndexesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = internalGetMutableVectorIndexes().ensureBuilderMap(); + com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) { + entry = ((com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder) entry; + } + + private boolean rebuild_ ; + /** + * bool rebuild = 4; + * @return The rebuild. + */ + @java.lang.Override + public boolean getRebuild() { + return rebuild_; + } + /** + * bool rebuild = 4; + * @param value The rebuild to set. + * @return This builder for chaining. + */ + public Builder setRebuild(boolean value) { + + rebuild_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool rebuild = 4; + * @return This builder for chaining. + */ + public Builder clearRebuild() { + bitField0_ = (bitField0_ & ~0x00000008); + rebuild_ = false; + onChanged(); + return this; + } + + private com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest rebuildRules_; + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest, com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.Builder, com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequestOrBuilder> rebuildRulesBuilder_; + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + * @return Whether the rebuildRules field is set. + */ + public boolean hasRebuildRules() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + * @return The rebuildRules. + */ + public com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest getRebuildRules() { + if (rebuildRulesBuilder_ == null) { + return rebuildRules_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.getDefaultInstance() : rebuildRules_; + } else { + return rebuildRulesBuilder_.getMessage(); + } + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + public Builder setRebuildRules(com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest value) { + if (rebuildRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rebuildRules_ = value; + } else { + rebuildRulesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + public Builder setRebuildRules( + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.Builder builderForValue) { + if (rebuildRulesBuilder_ == null) { + rebuildRules_ = builderForValue.build(); + } else { + rebuildRulesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + public Builder mergeRebuildRules(com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest value) { + if (rebuildRulesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + rebuildRules_ != null && + rebuildRules_ != com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.getDefaultInstance()) { + getRebuildRulesBuilder().mergeFrom(value); + } else { + rebuildRules_ = value; + } + } else { + rebuildRulesBuilder_.mergeFrom(value); + } + if (rebuildRules_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + public Builder clearRebuildRules() { + bitField0_ = (bitField0_ & ~0x00000010); + rebuildRules_ = null; + if (rebuildRulesBuilder_ != null) { + rebuildRulesBuilder_.dispose(); + rebuildRulesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.Builder getRebuildRulesBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRebuildRulesFieldBuilder().getBuilder(); + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + public com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequestOrBuilder getRebuildRulesOrBuilder() { + if (rebuildRulesBuilder_ != null) { + return rebuildRulesBuilder_.getMessageOrBuilder(); + } else { + return rebuildRules_ == null ? + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.getDefaultInstance() : rebuildRules_; + } + } + /** + * .com.tencent.tcvectordb.rpc.proto.RebuildIndexRequest rebuildRules = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest, com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.Builder, com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequestOrBuilder> + getRebuildRulesFieldBuilder() { + if (rebuildRulesBuilder_ == null) { + rebuildRulesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest, com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequest.Builder, com.tencent.tcvectordb.rpc.proto.Olama.RebuildIndexRequestOrBuilder>( + getRebuildRules(), + getParentForChildren(), + isClean()); + rebuildRules_ = null; + } + return rebuildRulesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexRequest) + private static final com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModifyVectorIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ModifyVectorIndexResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 code = 1; + * @return The code. + */ + int getCode(); + + /** + * string msg = 2; + * @return The msg. + */ + java.lang.String getMsg(); + /** + * string msg = 2; + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * string redirect = 3; + * @return The redirect. + */ + java.lang.String getRedirect(); + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + com.google.protobuf.ByteString + getRedirectBytes(); + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse} + */ + public static final class ModifyVectorIndexResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse) + ModifyVectorIndexResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModifyVectorIndexResponse.newBuilder() to construct. + private ModifyVectorIndexResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ModifyVectorIndexResponse() { + msg_ = ""; + redirect_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ModifyVectorIndexResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * int32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REDIRECT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object redirect_ = ""; + /** + * string redirect = 3; + * @return The redirect. + */ + @java.lang.Override + public java.lang.String getRedirect() { + java.lang.Object ref = redirect_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirect_ = s; + return s; + } + } + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRedirectBytes() { + java.lang.Object ref = redirect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + redirect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, redirect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, redirect_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse)) { + return super.equals(obj); + } + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse other = (com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getRedirect() + .equals(other.getRedirect())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + REDIRECT_FIELD_NUMBER; + hash = (53 * hash) + getRedirect().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse) + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.Builder.class); + } + + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + redirect_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_descriptor; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse build() { + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse result = new com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.redirect_ = redirect_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRedirect().isEmpty()) { + redirect_ = other.redirect_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + redirect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * int32 code = 1; + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * int32 code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * string msg = 2; + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string msg = 2; + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string msg = 2; + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string msg = 2; + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string msg = 2; + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object redirect_ = ""; + /** + * string redirect = 3; + * @return The redirect. + */ + public java.lang.String getRedirect() { + java.lang.Object ref = redirect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + redirect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string redirect = 3; + * @return The bytes for redirect. + */ + public com.google.protobuf.ByteString + getRedirectBytes() { + java.lang.Object ref = redirect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + redirect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string redirect = 3; + * @param value The redirect to set. + * @return This builder for chaining. + */ + public Builder setRedirect( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + redirect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string redirect = 3; + * @return This builder for chaining. + */ + public Builder clearRedirect() { + redirect_ = getDefaultInstance().getRedirect(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string redirect = 3; + * @param value The bytes for redirect to set. + * @return This builder for chaining. + */ + public Builder setRedirectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + redirect_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse) + } + + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.ModifyVectorIndexResponse) + private static final com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse(); + } + + public static com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModifyVectorIndexResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CountRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.CountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string database = 1; + * @return The database. + */ + java.lang.String getDatabase(); + /** + * string database = 1; + * @return The bytes for database. + */ + com.google.protobuf.ByteString + getDatabaseBytes(); + + /** + * string collection = 2; + * @return The collection. + */ + java.lang.String getCollection(); + /** + * string collection = 2; + * @return The bytes for collection. + */ + com.google.protobuf.ByteString + getCollectionBytes(); + + /** + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return Whether the query field is set. */ - /* nullable */ -com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrDefault( - java.lang.String key, - /* nullable */ -com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue); + boolean hasQuery(); /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return The query. */ - com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrThrow( - java.lang.String key); - + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond getQuery(); /** - * bool buildExistedData = 4; - * @return The buildExistedData. + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - boolean getBuildExistedData(); + com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder getQueryOrBuilder(); } /** - * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexRequest} + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.CountRequest} */ - public static final class AddIndexRequest extends + public static final class CountRequest extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) - AddIndexRequestOrBuilder { + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.CountRequest) + CountRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use AddIndexRequest.newBuilder() to construct. - private AddIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use CountRequest.newBuilder() to construct. + private CountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AddIndexRequest() { + private CountRequest() { database_ = ""; collection_ = ""; } @@ -77819,34 +85079,23 @@ private AddIndexRequest() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new AddIndexRequest(); + return new CountRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_descriptor; } - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetIndexes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_fieldAccessorTable + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.Builder.class); + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.Builder.class); } + private int bitField0_; public static final int DATABASE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object database_ = ""; @@ -77860,7 +85109,7 @@ public java.lang.String getDatabase() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); database_ = s; @@ -77876,7 +85125,7 @@ public java.lang.String getDatabase() { getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); database_ = b; @@ -77899,7 +85148,7 @@ public java.lang.String getCollection() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); collection_ = s; @@ -77915,7 +85164,7 @@ public java.lang.String getCollection() { getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; @@ -77925,94 +85174,30 @@ public java.lang.String getCollection() { } } - public static final int INDEXES_FIELD_NUMBER = 3; - private static final class IndexesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_IndexesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.getDefaultInstance()); - } - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn> indexes_; - private com.google.protobuf.MapField - internalGetIndexes() { - if (indexes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - IndexesDefaultEntryHolder.defaultEntry); - } - return indexes_; - } - public int getIndexesCount() { - return internalGetIndexes().getMap().size(); - } - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - @java.lang.Override - public boolean containsIndexes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetIndexes().getMap().containsKey(key); - } - /** - * Use {@link #getIndexesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getIndexes() { - return getIndexesMap(); - } - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - @java.lang.Override - public java.util.Map getIndexesMap() { - return internalGetIndexes().getMap(); - } + public static final int QUERY_FIELD_NUMBER = 3; + private com.tencent.tcvectordb.rpc.proto.Olama.QueryCond query_; /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return Whether the query field is set. */ @java.lang.Override - public /* nullable */ -com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrDefault( - java.lang.String key, - /* nullable */ -com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetIndexes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) != 0); } /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return The query. */ @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetIndexes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCond getQuery() { + return query_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; } - - public static final int BUILDEXISTEDDATA_FIELD_NUMBER = 4; - private boolean buildExistedData_ = false; /** - * bool buildExistedData = 4; - * @return The buildExistedData. + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ @java.lang.Override - public boolean getBuildExistedData() { - return buildExistedData_; + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder getQueryOrBuilder() { + return query_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; } private byte memoizedIsInitialized = -1; @@ -78035,14 +85220,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_); } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetIndexes(), - IndexesDefaultEntryHolder.defaultEntry, - 3); - if (buildExistedData_ != false) { - output.writeBool(4, buildExistedData_); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getQuery()); } getUnknownFields().writeTo(output); } @@ -78059,19 +85238,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_); } - for (java.util.Map.Entry entry - : internalGetIndexes().getMap().entrySet()) { - com.google.protobuf.MapEntry - indexes__ = IndexesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, indexes__); - } - if (buildExistedData_ != false) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, buildExistedData_); + .computeMessageSize(3, getQuery()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -78083,19 +85252,20 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest)) { + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.CountRequest)) { return super.equals(obj); } - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest other = (com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest) obj; + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest other = (com.tencent.tcvectordb.rpc.proto.Olama.CountRequest) obj; if (!getDatabase() .equals(other.getDatabase())) return false; if (!getCollection() .equals(other.getCollection())) return false; - if (!internalGetIndexes().equals( - other.internalGetIndexes())) return false; - if (getBuildExistedData() - != other.getBuildExistedData()) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery() + .equals(other.getQuery())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -78111,56 +85281,53 @@ public int hashCode() { hash = (53 * hash) + getDatabase().hashCode(); hash = (37 * hash) + COLLECTION_FIELD_NUMBER; hash = (53 * hash) + getCollection().hashCode(); - if (!internalGetIndexes().getMap().isEmpty()) { - hash = (37 * hash) + INDEXES_FIELD_NUMBER; - hash = (53 * hash) + internalGetIndexes().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); } - hash = (37 * hash) + BUILDEXISTEDDATA_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBuildExistedData()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom(byte[] data) + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom(java.io.InputStream input) + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -78168,26 +85335,26 @@ public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseDelimitedFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -78200,7 +85367,7 @@ public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest prototype) { + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.CountRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -78216,56 +85383,40 @@ protected Builder newBuilderForType( return builder; } /** - * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexRequest} + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.CountRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.CountRequest) + com.tencent.tcvectordb.rpc.proto.Olama.CountRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_descriptor; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetIndexes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 3: - return internalGetMutableIndexes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_fieldAccessorTable + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.Builder.class); + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.class, com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.Builder.class); } - // Construct using com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.newBuilder() + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQueryFieldBuilder(); + } } @java.lang.Override public Builder clear() { @@ -78273,25 +85424,28 @@ public Builder clear() { bitField0_ = 0; database_ = ""; collection_ = ""; - internalGetMutableIndexes().clear(); - buildExistedData_ = false; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_descriptor; } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest getDefaultInstanceForType() { - return com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.getDefaultInstance(); + public com.tencent.tcvectordb.rpc.proto.Olama.CountRequest getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.getDefaultInstance(); } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest build() { - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest result = buildPartial(); + public com.tencent.tcvectordb.rpc.proto.Olama.CountRequest build() { + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -78299,14 +85453,14 @@ public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest build() { } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest buildPartial() { - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest result = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest(this); + public com.tencent.tcvectordb.rpc.proto.Olama.CountRequest buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest result = new com.tencent.tcvectordb.rpc.proto.Olama.CountRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest result) { + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.CountRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.database_ = database_; @@ -78314,12 +85468,14 @@ private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexReques if (((from_bitField0_ & 0x00000002) != 0)) { result.collection_ = collection_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { - result.indexes_ = internalGetIndexes().build(IndexesDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.buildExistedData_ = buildExistedData_; + result.query_ = queryBuilder_ == null + ? query_ + : queryBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -78356,16 +85512,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest) { - return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest)other); + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.CountRequest) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.CountRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest other) { - if (other == com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.CountRequest other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.getDefaultInstance()) return this; if (!other.getDatabase().isEmpty()) { database_ = other.database_; bitField0_ |= 0x00000001; @@ -78376,11 +85532,8 @@ public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest bitField0_ |= 0x00000002; onChanged(); } - internalGetMutableIndexes().mergeFrom( - other.internalGetIndexes()); - bitField0_ |= 0x00000004; - if (other.getBuildExistedData() != false) { - setBuildExistedData(other.getBuildExistedData()); + if (other.hasQuery()) { + mergeQuery(other.getQuery()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -78419,19 +85572,12 @@ public Builder mergeFrom( break; } // case 18 case 26: { - com.google.protobuf.MapEntry - indexes__ = input.readMessage( - IndexesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableIndexes().ensureBuilderMap().put( - indexes__.getKey(), indexes__.getValue()); + input.readMessage( + getQueryFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 - case 32: { - buildExistedData_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -78474,7 +85620,7 @@ public java.lang.String getDatabase() { getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); database_ = b; @@ -78546,7 +85692,7 @@ public java.lang.String getCollection() { getCollectionBytes() { java.lang.Object ref = collection_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); collection_ = b; @@ -78593,191 +85739,125 @@ public Builder setCollectionBytes( return this; } - private static final class IndexesConverter implements com.google.protobuf.MapFieldBuilder.Converter { - @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn build(com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder val) { - if (val instanceof com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) { return (com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) val; } - return ((com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry defaultEntry() { - return IndexesDefaultEntryHolder.defaultEntry; - } - }; - private static final IndexesConverter indexesConverter = new IndexesConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn, com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder> indexes_; - private com.google.protobuf.MapFieldBuilder - internalGetIndexes() { - if (indexes_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(indexesConverter); - } - return indexes_; - } - private com.google.protobuf.MapFieldBuilder - internalGetMutableIndexes() { - if (indexes_ == null) { - indexes_ = new com.google.protobuf.MapFieldBuilder<>(indexesConverter); - } - bitField0_ |= 0x00000004; - onChanged(); - return indexes_; - } - public int getIndexesCount() { - return internalGetIndexes().ensureBuilderMap().size(); - } - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - @java.lang.Override - public boolean containsIndexes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetIndexes().ensureBuilderMap().containsKey(key); - } - /** - * Use {@link #getIndexesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getIndexes() { - return getIndexesMap(); - } - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - @java.lang.Override - public java.util.Map getIndexesMap() { - return internalGetIndexes().getImmutableMap(); - } + private com.tencent.tcvectordb.rpc.proto.Olama.QueryCond query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond, com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder, com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder> queryBuilder_; /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return Whether the query field is set. */ - @java.lang.Override - public /* nullable */ -com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrDefault( - java.lang.String key, - /* nullable */ -com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableIndexes().ensureBuilderMap(); - return map.containsKey(key) ? indexesConverter.build(map.get(key)) : defaultValue; + public boolean hasQuery() { + return ((bitField0_ & 0x00000004) != 0); } /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; + * @return The query. */ - @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn getIndexesOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = internalGetMutableIndexes().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCond getQuery() { + if (queryBuilder_ == null) { + return query_ == null ? com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; + } else { + return queryBuilder_.getMessage(); } - return indexesConverter.build(map.get(key)); - } - public Builder clearIndexes() { - bitField0_ = (bitField0_ & ~0x00000004); - internalGetMutableIndexes().clear(); - return this; - } - /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; - */ - public Builder removeIndexes( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableIndexes().ensureBuilderMap() - .remove(key); - return this; } /** - * Use alternate mutation accessors instead. + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - @java.lang.Deprecated - public java.util.Map - getMutableIndexes() { + public Builder setQuery(com.tencent.tcvectordb.rpc.proto.Olama.QueryCond value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } bitField0_ |= 0x00000004; - return internalGetMutableIndexes().ensureMessageMap(); + onChanged(); + return this; } /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - public Builder putIndexes( - java.lang.String key, - com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableIndexes().ensureBuilderMap() - .put(key, value); + public Builder setQuery( + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000004; + onChanged(); return this; } /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - public Builder putAllIndexes( - java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); + public Builder mergeQuery(com.tencent.tcvectordb.rpc.proto.Olama.QueryCond value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + query_ != null && + query_ != com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; } + } else { + queryBuilder_.mergeFrom(value); + } + if (query_ != null) { + bitField0_ |= 0x00000004; + onChanged(); } - internalGetMutableIndexes().ensureBuilderMap() - .putAll(values); - bitField0_ |= 0x00000004; return this; } /** - * map<string, .com.tencent.tcvectordb.rpc.proto.IndexColumn> indexes = 3; + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - public com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder putIndexesBuilderIfAbsent( - java.lang.String key) { - java.util.Map builderMap = internalGetMutableIndexes().ensureBuilderMap(); - com.tencent.tcvectordb.rpc.proto.Olama.IndexColumnOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) { - entry = ((com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn) entry).toBuilder(); - builderMap.put(key, entry); + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000004); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; } - return (com.tencent.tcvectordb.rpc.proto.Olama.IndexColumn.Builder) entry; + onChanged(); + return this; } - - private boolean buildExistedData_ ; /** - * bool buildExistedData = 4; - * @return The buildExistedData. + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - @java.lang.Override - public boolean getBuildExistedData() { - return buildExistedData_; + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder getQueryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getQueryFieldBuilder().getBuilder(); } /** - * bool buildExistedData = 4; - * @param value The buildExistedData to set. - * @return This builder for chaining. + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - public Builder setBuildExistedData(boolean value) { - - buildExistedData_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + public com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null ? + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.getDefaultInstance() : query_; + } } /** - * bool buildExistedData = 4; - * @return This builder for chaining. + * .com.tencent.tcvectordb.rpc.proto.QueryCond query = 3; */ - public Builder clearBuildExistedData() { - bitField0_ = (bitField0_ & ~0x00000008); - buildExistedData_ = false; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond, com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder, com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.tencent.tcvectordb.rpc.proto.Olama.QueryCond, com.tencent.tcvectordb.rpc.proto.Olama.QueryCond.Builder, com.tencent.tcvectordb.rpc.proto.Olama.QueryCondOrBuilder>( + getQuery(), + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; } @java.lang.Override public final Builder setUnknownFields( @@ -78792,23 +85872,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.CountRequest) } - // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.AddIndexRequest) - private static final com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.CountRequest) + private static final com.tencent.tcvectordb.rpc.proto.Olama.CountRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest(); + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.CountRequest(); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest getDefaultInstance() { + public static com.tencent.tcvectordb.rpc.proto.Olama.CountRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public AddIndexRequest parsePartialFrom( + public CountRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -78827,24 +85907,24 @@ public AddIndexRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest getDefaultInstanceForType() { + public com.tencent.tcvectordb.rpc.proto.Olama.CountRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface AddIndexResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + public interface CountResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.tencent.tcvectordb.rpc.proto.CountResponse) com.google.protobuf.MessageOrBuilder { /** @@ -78876,20 +85956,26 @@ public interface AddIndexResponseOrBuilder extends */ com.google.protobuf.ByteString getRedirectBytes(); + + /** + * uint64 count = 4; + * @return The count. + */ + long getCount(); } /** - * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexResponse} + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.CountResponse} */ - public static final class AddIndexResponse extends + public static final class CountResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) - AddIndexResponseOrBuilder { + // @@protoc_insertion_point(message_implements:com.tencent.tcvectordb.rpc.proto.CountResponse) + CountResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use AddIndexResponse.newBuilder() to construct. - private AddIndexResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use CountResponse.newBuilder() to construct. + private CountResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AddIndexResponse() { + private CountResponse() { msg_ = ""; redirect_ = ""; } @@ -78898,20 +85984,20 @@ private AddIndexResponse() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new AddIndexResponse(); + return new CountResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_fieldAccessorTable + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.Builder.class); + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.Builder.class); } public static final int CODE_FIELD_NUMBER = 1; @@ -78938,7 +86024,7 @@ public java.lang.String getMsg() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); msg_ = s; @@ -78954,7 +86040,7 @@ public java.lang.String getMsg() { getMsgBytes() { java.lang.Object ref = msg_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); msg_ = b; @@ -78977,7 +86063,7 @@ public java.lang.String getRedirect() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); redirect_ = s; @@ -78993,7 +86079,7 @@ public java.lang.String getRedirect() { getRedirectBytes() { java.lang.Object ref = redirect_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); redirect_ = b; @@ -79003,6 +86089,17 @@ public java.lang.String getRedirect() { } } + public static final int COUNT_FIELD_NUMBER = 4; + private long count_ = 0L; + /** + * uint64 count = 4; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -79026,6 +86123,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, redirect_); } + if (count_ != 0L) { + output.writeUInt64(4, count_); + } getUnknownFields().writeTo(output); } @@ -79045,6 +86145,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, redirect_); } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, count_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -79055,10 +86159,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse)) { + if (!(obj instanceof com.tencent.tcvectordb.rpc.proto.Olama.CountResponse)) { return super.equals(obj); } - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse other = (com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse) obj; + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse other = (com.tencent.tcvectordb.rpc.proto.Olama.CountResponse) obj; if (getCode() != other.getCode()) return false; @@ -79066,6 +86170,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getMsg())) return false; if (!getRedirect() .equals(other.getRedirect())) return false; + if (getCount() + != other.getCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -79083,49 +86189,52 @@ public int hashCode() { hash = (53 * hash) + getMsg().hashCode(); hash = (37 * hash) + REDIRECT_FIELD_NUMBER; hash = (53 * hash) + getRedirect().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom(byte[] data) + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom(java.io.InputStream input) + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -79133,26 +86242,26 @@ public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseDelimitedFrom(java.io.InputStream input) + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseDelimitedFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -79165,7 +86274,7 @@ public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse prototype) { + public static Builder newBuilder(com.tencent.tcvectordb.rpc.proto.Olama.CountResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -79181,26 +86290,26 @@ protected Builder newBuilderForType( return builder; } /** - * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.AddIndexResponse} + * Protobuf type {@code com.tencent.tcvectordb.rpc.proto.CountResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponseOrBuilder { + // @@protoc_insertion_point(builder_implements:com.tencent.tcvectordb.rpc.proto.CountResponse) + com.tencent.tcvectordb.rpc.proto.Olama.CountResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_fieldAccessorTable + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.Builder.class); + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.class, com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.Builder.class); } - // Construct using com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.newBuilder() + // Construct using com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.newBuilder() private Builder() { } @@ -79217,23 +86326,24 @@ public Builder clear() { code_ = 0; msg_ = ""; redirect_ = ""; + count_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; + return com.tencent.tcvectordb.rpc.proto.Olama.internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_descriptor; } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse getDefaultInstanceForType() { - return com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.getDefaultInstance(); + public com.tencent.tcvectordb.rpc.proto.Olama.CountResponse getDefaultInstanceForType() { + return com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.getDefaultInstance(); } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse build() { - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse result = buildPartial(); + public com.tencent.tcvectordb.rpc.proto.Olama.CountResponse build() { + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -79241,14 +86351,14 @@ public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse build() { } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse buildPartial() { - com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse result = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse(this); + public com.tencent.tcvectordb.rpc.proto.Olama.CountResponse buildPartial() { + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse result = new com.tencent.tcvectordb.rpc.proto.Olama.CountResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse result) { + private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.CountResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.code_ = code_; @@ -79259,6 +86369,9 @@ private void buildPartial0(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRespon if (((from_bitField0_ & 0x00000004) != 0)) { result.redirect_ = redirect_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.count_ = count_; + } } @java.lang.Override @@ -79295,16 +86408,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse) { - return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse)other); + if (other instanceof com.tencent.tcvectordb.rpc.proto.Olama.CountResponse) { + return mergeFrom((com.tencent.tcvectordb.rpc.proto.Olama.CountResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse other) { - if (other == com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.CountResponse other) { + if (other == com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.getDefaultInstance()) return this; if (other.getCode() != 0) { setCode(other.getCode()); } @@ -79318,6 +86431,9 @@ public Builder mergeFrom(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse bitField0_ |= 0x00000004; onChanged(); } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -79359,6 +86475,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 32: { + count_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -79433,7 +86554,7 @@ public java.lang.String getMsg() { getMsgBytes() { java.lang.Object ref = msg_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); msg_ = b; @@ -79505,7 +86626,7 @@ public java.lang.String getRedirect() { getRedirectBytes() { java.lang.Object ref = redirect_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); redirect_ = b; @@ -79551,6 +86672,38 @@ public Builder setRedirectBytes( onChanged(); return this; } + + private long count_ ; + /** + * uint64 count = 4; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * uint64 count = 4; + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint64 count = 4; + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000008); + count_ = 0L; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -79564,23 +86717,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) + // @@protoc_insertion_point(builder_scope:com.tencent.tcvectordb.rpc.proto.CountResponse) } - // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.AddIndexResponse) - private static final com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:com.tencent.tcvectordb.rpc.proto.CountResponse) + private static final com.tencent.tcvectordb.rpc.proto.Olama.CountResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse(); + DEFAULT_INSTANCE = new com.tencent.tcvectordb.rpc.proto.Olama.CountResponse(); } - public static com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse getDefaultInstance() { + public static com.tencent.tcvectordb.rpc.proto.Olama.CountResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public AddIndexResponse parsePartialFrom( + public CountResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -79599,17 +86752,17 @@ public AddIndexResponse parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse getDefaultInstanceForType() { + public com.tencent.tcvectordb.rpc.proto.Olama.CountResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -80806,19 +87959,59 @@ public com.tencent.tcvectordb.rpc.proto.Olama.HttpResponse getDefaultInstanceFor internal_static_com_tencent_tcvectordb_rpc_proto_GetVersionResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_descriptor; - private static final + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_IndexesEntry_descriptor; - private static final + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexRequest_IndexesEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor; - private static final + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_VectorIndexesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_VectorIndexesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_tencent_tcvectordb_rpc_proto_HttpRequest_descriptor; private static final @@ -80870,342 +88063,380 @@ public com.tencent.tcvectordb.rpc.proto.Olama.HttpResponse getDefaultInstanceFor "ent.tcvectordb.rpc.proto.ShardState\022\r\n\005n" + "odes\030\006 \003(\t\022\021\n\tfrom_node\030\007 \001(\t\022\017\n\007version" + "\030\010 \001(\003\".\n\tAliasItem\022\r\n\005alias\030\001 \001(\t\022\022\n\nco" + - "llection\030\002 \001(\t\"`\n\014DatabaseItem\022\023\n\013create" + + "llection\030\002 \001(\t\"o\n\014DatabaseItem\022\023\n\013create" + "_time\030\001 \001(\003\022;\n\007db_type\030\002 \001(\0162*.com.tence" + - "nt.tcvectordb.rpc.proto.DataType\"9\n\014Snap" + - "shotRule\022\023\n\013period_secs\030\001 \001(\r\022\024\n\014changed" + - "_docs\030\002 \001(\r\"J\n\017EmbeddingParams\022\r\n\005field\030" + - "\001 \001(\t\022\024\n\014vector_field\030\002 \001(\t\022\022\n\nmodel_nam" + - "e\030\003 \001(\t\"\251\007\n\016CollectionConf\022\020\n\010database\030\001" + - " \001(\t\022\022\n\ncollection\030\002 \001(\t\022\023\n\013description\030" + - "\003 \001(\t\022\030\n\020number_of_shards\030\004 \001(\r\022\032\n\022numbe" + - "r_of_replicas\030\005 \001(\r\022\021\n\tdimension\030\006 \001(\r\022A" + - "\n\006metric\030\007 \001(\01621.com.tencent.tcvectordb." + - "rpc.proto.IndexMetricType\022\016\n\006nprobe\030\010 \001(" + - "\r\022F\n\016snapshot_rules\030\t \003(\0132..com.tencent." + - "tcvectordb.rpc.proto.SnapshotRule\022A\n\006eng" + - "ine\030\013 \001(\01621.com.tencent.tcvectordb.rpc.p" + - "roto.IndexEngineType\022\022\n\nmodel_desc\030\014 \001(\t" + - "\022U\n\013field_metas\030\017 \003(\0132@.com.tencent.tcve" + - "ctordb.rpc.proto.CollectionConf.FieldMet" + - "asEntry\022N\n\007options\030\020 \003(\0132=.com.tencent.t" + - "cvectordb.rpc.proto.CollectionConf.Optio" + - "nsEntry\022\r\n\005nlist\030\021 \001(\r\022K\n\020embedding_para" + - "ms\030\022 \001(\01321.com.tencent.tcvectordb.rpc.pr" + - "oto.EmbeddingParams\022=\n\tdata_type\030\023 \001(\0162*" + - ".com.tencent.tcvectordb.rpc.proto.DataTy" + - "pe\022\017\n\007version\030\024 \001(\003\022>\n\tttlConfig\030\025 \001(\0132+" + - ".com.tencent.tcvectordb.rpc.proto.TTLCon" + - "fig\032^\n\017FieldMetasEntry\022\013\n\003key\030\001 \001(\t\022:\n\005v" + - "alue\030\002 \001(\0132+.com.tencent.tcvectordb.rpc." + - "proto.FieldMeta:\0028\001\032.\n\014OptionsEntry\022\013\n\003k" + - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\234\001\n\tFieldMet" + - "a\022?\n\nfield_type\030\001 \001(\0162+.com.tencent.tcve" + - "ctordb.rpc.proto.FieldType\022N\n\022field_elem" + - "ent_type\030\002 \001(\01622.com.tencent.tcvectordb." + - "rpc.proto.FieldElementType\"\201\001\n\tShardConf" + - "\022\022\n\ncollection\030\001 \001(\t\022\021\n\tshard_idx\030\002 \001(\005\022" + - ">\n\004conf\030\003 \001(\01320.com.tencent.tcvectordb.r" + - "pc.proto.CollectionConf\022\r\n\005nodes\030\004 \003(\t\"." + - "\n\tTTLConfig\022\016\n\006enable\030\001 \001(\010\022\021\n\ttimeField" + - "\030\002 \001(\t\"\206\002\n\024ShardCollectionState\022\021\n\tshard" + - "_idx\030\001 \001(\005\022\016\n\006leader\030\002 \001(\t\022\022\n\nnode_peers" + - "\030\003 \003(\t\022\031\n\021allocate_start_ms\030\004 \001(\003\022\030\n\020all" + - "ocate_stop_ms\030\005 \001(\003\022\021\n\tleader_ms\030\006 \001(\003\022\022" + - "\n\nallocating\030\007 \001(\010\0227\n\006shards\030\010 \003(\0132\'.com" + - ".tencent.tcvectordb.rpc.proto.Shard\022\020\n\010c" + - "reating\030\t \001(\010\022\020\n\010removing\030\n \001(\010\"\236\003\n\017Coll" + - "ectionState\022\022\n\ncollection\030\001 \001(\t\022>\n\004conf\030" + - "\002 \001(\01320.com.tencent.tcvectordb.rpc.proto" + - ".CollectionConf\022F\n\006shards\030\003 \003(\01326.com.te" + - "ncent.tcvectordb.rpc.proto.ShardCollecti" + - "onState\022\014\n\004size\030\004 \001(\004\022\023\n\013create_time\030\005 \001" + - "(\003\022F\n\003req\030\006 \001(\01329.com.tencent.tcvectordb" + - ".rpc.proto.CreateCollectionRequest\022=\n\006st" + - "atus\030\007 \001(\0162-.com.tencent.tcvectordb.rpc." + - "proto.HealthState\022E\n\013index_state\030\010 \001(\01620" + - ".com.tencent.tcvectordb.rpc.proto.ShardD" + - "ataState\"F\n\017AddAliasRequest\022\020\n\010database\030" + - "\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022\r\n\005alias\030\003 \001(\t" + - "\"5\n\022RemoveAliasRequest\022\020\n\010database\030\001 \001(\t" + - "\022\r\n\005alias\030\002 \001(\t\"Y\n\023UpdateAliasResponse\022\014" + - "\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 " + - "\001(\t\022\025\n\raffectedCount\030\004 \001(\004\"2\n\017GetAliasRe" + - "quest\022\020\n\010database\030\001 \001(\t\022\r\n\005alias\030\002 \001(\t\"}" + - "\n\020GetAliasResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030" + - "\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022<\n\007aliases\030\004 \003(\013" + - "2+.com.tencent.tcvectordb.rpc.proto.Alia" + - "sItem\"\024\n\022GetNodeInfoRequest\"\316\001\n\023GetNodeI" + - "nfoResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020" + - "\n\010redirect\030\003 \001(\t\022X\n\nnode_infos\030\004 \003(\0132D.c" + - "om.tencent.tcvectordb.rpc.proto.GetNodeI" + - "nfoResponse.NodeInfosEntry\0320\n\016NodeInfosE" + - "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"S\n\031" + - "DescribeCollectionRequest\022\020\n\010database\030\001 " + - "\001(\t\022\022\n\ncollection\030\002 \001(\t\022\020\n\010transfer\030\003 \001(" + - "\010\"\332\001\n\032DescribeCollectionResponse\022\014\n\004code" + - "\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022M\n" + - "\ncollection\030\004 \001(\01329.com.tencent.tcvector" + - "db.rpc.proto.CreateCollectionRequest\022@\n\005" + - "state\030\005 \001(\01321.com.tencent.tcvectordb.rpc" + - ".proto.CollectionState\"<\n\026ListCollection" + - "sRequest\022\020\n\010database\030\001 \001(\t\022\020\n\010transfer\030\002" + - " \001(\010\"\331\001\n\027ListCollectionsResponse\022\014\n\004code" + - "\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022N\n" + - "\013collections\030\004 \003(\01329.com.tencent.tcvecto" + - "rdb.rpc.proto.CreateCollectionRequest\022A\n" + - "\006states\030\005 \003(\01321.com.tencent.tcvectordb.r" + - "pc.proto.CollectionState\"O\n\013IndexParams\022" + - "\t\n\001M\030\001 \001(\r\022\026\n\016efConstruction\030\002 \001(\r\022\016\n\006np" + - "robe\030\003 \001(\r\022\r\n\005nlist\030\004 \001(\r\"\306\001\n\013IndexColum" + - "n\022\021\n\tfieldName\030\001 \001(\t\022\021\n\tfieldType\030\002 \001(\t\022" + - "\021\n\tindexType\030\003 \001(\t\022\021\n\tdimension\030\004 \001(\r\022\022\n" + - "\nmetricType\030\005 \001(\t\022=\n\006params\030\010 \001(\0132-.com." + - "tencent.tcvectordb.rpc.proto.IndexParams" + - "\022\030\n\020fieldElementType\030\t \001(\t\"B\n\013indexStatu" + - "s\022\016\n\006status\030\001 \001(\t\022\020\n\010progress\030\002 \001(\t\022\021\n\ts" + - "tartTime\030\003 \001(\t\"U\n\021FilterIndexConfig\022\021\n\tf" + - "ilterAll\030\001 \001(\010\022\032\n\022fieldsWithoutIndex\030\002 \003" + - "(\t\022\021\n\tmaxStrLen\030\003 \001(\r\"\231\005\n\027CreateCollecti" + - "onRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollectio" + - "n\030\002 \001(\t\022\022\n\nreplicaNum\030\003 \001(\r\022\020\n\010shardNum\030" + - "\004 \001(\r\022\014\n\004size\030\005 \001(\004\022\022\n\ncreateTime\030\006 \001(\t\022" + - "\023\n\013description\030\007 \001(\t\022W\n\007indexes\030\010 \003(\0132F." + - "com.tencent.tcvectordb.rpc.proto.CreateC" + - "ollectionRequest.IndexesEntry\022B\n\013indexSt" + - "atus\030\t \001(\0132-.com.tencent.tcvectordb.rpc." + - "proto.indexStatus\022\022\n\nalias_list\030\n \003(\t\022J\n" + - "\017embeddingParams\030\013 \001(\01321.com.tencent.tcv" + - "ectordb.rpc.proto.EmbeddingParams\022\017\n\007ver" + - "sion\030\014 \001(\003\022>\n\tttlConfig\030\r \001(\0132+.com.tenc" + - "ent.tcvectordb.rpc.proto.TTLConfig\022N\n\021fi" + - "lterIndexConfig\030\016 \001(\01323.com.tencent.tcve" + - "ctordb.rpc.proto.FilterIndexConfig\032]\n\014In" + - "dexesEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-" + - ".com.tencent.tcvectordb.rpc.proto.IndexC" + - "olumn:\0028\001\"^\n\030CreateCollectionResponse\022\014\n" + - "\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001" + - "(\t\022\025\n\raffectedCount\030\004 \001(\004\"c\n\025DropCollect" + - "ionRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollecti" + - "on\030\002 \001(\t\022\r\n\005force\030\003 \001(\010\022\025\n\rwithout_alias" + - "\030\004 \001(\010\"\\\n\026DropCollectionResponse\022\014\n\004code" + - "\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022\025\n" + - "\raffectedCount\030\004 \001(\004\"b\n\031TruncateCollecti" + - "onRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollectio" + - "n\030\002 \001(\t\022\037\n\027only_truncate_ann_index\030\003 \001(\010" + - "\"`\n\032TruncateCollectionResponse\022\014\n\004code\030\001" + - " \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022\025\n\ra" + - "ffectedCount\030\004 \001(\004\"\226\001\n\023RebuildIndexReque" + + "nt.tcvectordb.rpc.proto.DataType\022\r\n\005coun" + + "t\030\003 \001(\003\"9\n\014SnapshotRule\022\023\n\013period_secs\030\001" + + " \001(\r\022\024\n\014changed_docs\030\002 \001(\r\"J\n\017EmbeddingP" + + "arams\022\r\n\005field\030\001 \001(\t\022\024\n\014vector_field\030\002 \001" + + "(\t\022\022\n\nmodel_name\030\003 \001(\t\"\251\007\n\016CollectionCon" + + "f\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022" + + "\023\n\013description\030\003 \001(\t\022\030\n\020number_of_shards" + + "\030\004 \001(\r\022\032\n\022number_of_replicas\030\005 \001(\r\022\021\n\tdi" + + "mension\030\006 \001(\r\022A\n\006metric\030\007 \001(\01621.com.tenc" + + "ent.tcvectordb.rpc.proto.IndexMetricType" + + "\022\016\n\006nprobe\030\010 \001(\r\022F\n\016snapshot_rules\030\t \003(\013" + + "2..com.tencent.tcvectordb.rpc.proto.Snap" + + "shotRule\022A\n\006engine\030\013 \001(\01621.com.tencent.t" + + "cvectordb.rpc.proto.IndexEngineType\022\022\n\nm" + + "odel_desc\030\014 \001(\t\022U\n\013field_metas\030\017 \003(\0132@.c" + + "om.tencent.tcvectordb.rpc.proto.Collecti" + + "onConf.FieldMetasEntry\022N\n\007options\030\020 \003(\0132" + + "=.com.tencent.tcvectordb.rpc.proto.Colle" + + "ctionConf.OptionsEntry\022\r\n\005nlist\030\021 \001(\r\022K\n" + + "\020embedding_params\030\022 \001(\01321.com.tencent.tc" + + "vectordb.rpc.proto.EmbeddingParams\022=\n\tda" + + "ta_type\030\023 \001(\0162*.com.tencent.tcvectordb.r" + + "pc.proto.DataType\022\017\n\007version\030\024 \001(\003\022>\n\ttt" + + "lConfig\030\025 \001(\0132+.com.tencent.tcvectordb.r" + + "pc.proto.TTLConfig\032^\n\017FieldMetasEntry\022\013\n" + + "\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.com.tencent." + + "tcvectordb.rpc.proto.FieldMeta:\0028\001\032.\n\014Op" + + "tionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"\234\001\n\tFieldMeta\022?\n\nfield_type\030\001 \001(\0162+.c" + + "om.tencent.tcvectordb.rpc.proto.FieldTyp" + + "e\022N\n\022field_element_type\030\002 \001(\01622.com.tenc" + + "ent.tcvectordb.rpc.proto.FieldElementTyp" + + "e\"\201\001\n\tShardConf\022\022\n\ncollection\030\001 \001(\t\022\021\n\ts" + + "hard_idx\030\002 \001(\005\022>\n\004conf\030\003 \001(\01320.com.tence" + + "nt.tcvectordb.rpc.proto.CollectionConf\022\r" + + "\n\005nodes\030\004 \003(\t\".\n\tTTLConfig\022\016\n\006enable\030\001 \001" + + "(\010\022\021\n\ttimeField\030\002 \001(\t\"\206\002\n\024ShardCollectio" + + "nState\022\021\n\tshard_idx\030\001 \001(\005\022\016\n\006leader\030\002 \001(" + + "\t\022\022\n\nnode_peers\030\003 \003(\t\022\031\n\021allocate_start_" + + "ms\030\004 \001(\003\022\030\n\020allocate_stop_ms\030\005 \001(\003\022\021\n\tle" + + "ader_ms\030\006 \001(\003\022\022\n\nallocating\030\007 \001(\010\0227\n\006sha" + + "rds\030\010 \003(\0132\'.com.tencent.tcvectordb.rpc.p" + + "roto.Shard\022\020\n\010creating\030\t \001(\010\022\020\n\010removing" + + "\030\n \001(\010\"\236\003\n\017CollectionState\022\022\n\ncollection" + + "\030\001 \001(\t\022>\n\004conf\030\002 \001(\01320.com.tencent.tcvec" + + "tordb.rpc.proto.CollectionConf\022F\n\006shards" + + "\030\003 \003(\01326.com.tencent.tcvectordb.rpc.prot" + + "o.ShardCollectionState\022\014\n\004size\030\004 \001(\004\022\023\n\013" + + "create_time\030\005 \001(\003\022F\n\003req\030\006 \001(\01329.com.ten" + + "cent.tcvectordb.rpc.proto.CreateCollecti" + + "onRequest\022=\n\006status\030\007 \001(\0162-.com.tencent." + + "tcvectordb.rpc.proto.HealthState\022E\n\013inde" + + "x_state\030\010 \001(\01620.com.tencent.tcvectordb.r" + + "pc.proto.ShardDataState\"F\n\017AddAliasReque" + "st\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t" + - "\022\031\n\021dropBeforeRebuild\030\003 \001(\010\022\020\n\010throttle\030" + - "\004 \001(\005\022\025\n\rdisable_train\030\005 \001(\010\022\025\n\rforce_re" + - "build\030\006 \001(\010\"U\n\024RebuildIndexResponse\022\014\n\004c" + - "ode\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t" + - "\022\020\n\010task_ids\030\004 \003(\t\"\240\001\n\rUpsertRequest\022\020\n\010" + - "database\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022\022\n\nbu" + - "ildIndex\030\003 \001(\010\022=\n\tdocuments\030\004 \003(\0132*.com." + - "tencent.tcvectordb.rpc.proto.Document\022\026\n" + - "\016buildIndexMode\030\005 \001(\t\"(\n\022EmbeddingExtraI" + - "nfo\022\022\n\ntoken_used\030\001 \001(\004\"\271\001\n\016UpsertRespon" + - "se\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirec" + - "t\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(\004\022\017\n\007warnin" + - "g\030\005 \001(\t\022R\n\024embedding_extra_info\030\006 \001(\01324." + + "\022\r\n\005alias\030\003 \001(\t\"5\n\022RemoveAliasRequest\022\020\n" + + "\010database\030\001 \001(\t\022\r\n\005alias\030\002 \001(\t\"Y\n\023Update" + + "AliasResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t" + + "\022\020\n\010redirect\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(" + + "\004\"2\n\017GetAliasRequest\022\020\n\010database\030\001 \001(\t\022\r" + + "\n\005alias\030\002 \001(\t\"}\n\020GetAliasResponse\022\014\n\004cod" + + "e\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022<" + + "\n\007aliases\030\004 \003(\0132+.com.tencent.tcvectordb" + + ".rpc.proto.AliasItem\"\024\n\022GetNodeInfoReque" + + "st\"\316\001\n\023GetNodeInfoResponse\022\014\n\004code\030\001 \001(\005" + + "\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022X\n\nnode_" + + "infos\030\004 \003(\0132D.com.tencent.tcvectordb.rpc" + + ".proto.GetNodeInfoResponse.NodeInfosEntr" + + "y\0320\n\016NodeInfosEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"S\n\031DescribeCollectionRequest" + + "\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022\020" + + "\n\010transfer\030\003 \001(\010\"\332\001\n\032DescribeCollectionR" + + "esponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010re" + + "direct\030\003 \001(\t\022M\n\ncollection\030\004 \001(\01329.com.t" + + "encent.tcvectordb.rpc.proto.CreateCollec" + + "tionRequest\022@\n\005state\030\005 \001(\01321.com.tencent" + + ".tcvectordb.rpc.proto.CollectionState\"<\n" + + "\026ListCollectionsRequest\022\020\n\010database\030\001 \001(" + + "\t\022\020\n\010transfer\030\002 \001(\010\"\331\001\n\027ListCollectionsR" + + "esponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010re" + + "direct\030\003 \001(\t\022N\n\013collections\030\004 \003(\01329.com." + + "tencent.tcvectordb.rpc.proto.CreateColle" + + "ctionRequest\022A\n\006states\030\005 \003(\01321.com.tence" + + "nt.tcvectordb.rpc.proto.CollectionState\"" + + "O\n\013IndexParams\022\t\n\001M\030\001 \001(\r\022\026\n\016efConstruct" + + "ion\030\002 \001(\r\022\016\n\006nprobe\030\003 \001(\r\022\r\n\005nlist\030\004 \001(\r" + + "\"\306\001\n\013IndexColumn\022\021\n\tfieldName\030\001 \001(\t\022\021\n\tf" + + "ieldType\030\002 \001(\t\022\021\n\tindexType\030\003 \001(\t\022\021\n\tdim" + + "ension\030\004 \001(\r\022\022\n\nmetricType\030\005 \001(\t\022=\n\006para" + + "ms\030\010 \001(\0132-.com.tencent.tcvectordb.rpc.pr" + + "oto.IndexParams\022\030\n\020fieldElementType\030\t \001(" + + "\t\"B\n\013indexStatus\022\016\n\006status\030\001 \001(\t\022\020\n\010prog" + + "ress\030\002 \001(\t\022\021\n\tstartTime\030\003 \001(\t\"U\n\021FilterI" + + "ndexConfig\022\021\n\tfilterAll\030\001 \001(\010\022\032\n\022fieldsW" + + "ithoutIndex\030\002 \003(\t\022\021\n\tmaxStrLen\030\003 \001(\r\"\231\005\n" + + "\027CreateCollectionRequest\022\020\n\010database\030\001 \001" + + "(\t\022\022\n\ncollection\030\002 \001(\t\022\022\n\nreplicaNum\030\003 \001" + + "(\r\022\020\n\010shardNum\030\004 \001(\r\022\014\n\004size\030\005 \001(\004\022\022\n\ncr" + + "eateTime\030\006 \001(\t\022\023\n\013description\030\007 \001(\t\022W\n\007i" + + "ndexes\030\010 \003(\0132F.com.tencent.tcvectordb.rp" + + "c.proto.CreateCollectionRequest.IndexesE" + + "ntry\022B\n\013indexStatus\030\t \001(\0132-.com.tencent." + + "tcvectordb.rpc.proto.indexStatus\022\022\n\nalia" + + "s_list\030\n \003(\t\022J\n\017embeddingParams\030\013 \001(\01321." + "com.tencent.tcvectordb.rpc.proto.Embeddi" + - "ngExtraInfo\"\255\001\n\rUpdateRequest\022\020\n\010databas" + - "e\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022:\n\005query\030\003 \001" + - "(\0132+.com.tencent.tcvectordb.rpc.proto.Qu" + - "eryCond\022:\n\006update\030\004 \001(\0132*.com.tencent.tc" + - "vectordb.rpc.proto.Document\"\271\001\n\016UpdateRe" + - "sponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010red" + - "irect\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(\004\022\017\n\007wa" + - "rning\030\005 \001(\t\022R\n\024embedding_extra_info\030\006 \001(" + - "\01324.com.tencent.tcvectordb.rpc.proto.Emb" + - "eddingExtraInfo\"q\n\rDeleteRequest\022\020\n\010data" + - "base\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022:\n\005query\030" + - "\003 \001(\0132+.com.tencent.tcvectordb.rpc.proto" + - ".QueryCond\"T\n\016DeleteResponse\022\014\n\004code\030\001 \001" + - "(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022\025\n\raff" + - "ectedCount\030\004 \001(\004\"\255\001\n\tQueryCond\022\023\n\013docume" + - "ntIds\030\001 \003(\t\022\020\n\010indexIds\030\002 \003(\004\022\026\n\016retriev" + - "eVector\030\003 \001(\010\022\016\n\006filter\030\004 \001(\t\022\r\n\005limit\030\005" + - " \001(\003\022\016\n\006offset\030\006 \001(\003\022\024\n\014outputFields\030\007 \003" + - "(\t\022\034\n\024retrieveSparseVector\030\010 \001(\010\"\211\001\n\014Que" + - "ryRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollectio" + - "n\030\002 \001(\t\022:\n\005query\030\003 \001(\0132+.com.tencent.tcv" + - "ectordb.rpc.proto.QueryCond\022\027\n\017readConsi" + - "stency\030\004 \001(\t\"\212\001\n\rQueryResponse\022\014\n\004code\030\001" + - " \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022=\n\td" + - "ocuments\030\004 \003(\0132*.com.tencent.tcvectordb." + - "rpc.proto.Document\022\r\n\005count\030\005 \001(\004\"M\n\014Sea" + - "rchResult\022=\n\tdocuments\030\001 \003(\0132*.com.tence" + - "nt.tcvectordb.rpc.proto.Document\":\n\014Sear" + - "chParams\022\016\n\006nprobe\030\001 \001(\r\022\n\n\002ef\030\002 \001(\r\022\016\n\006" + - "radius\030\003 \001(\002\"\035\n\013VectorArray\022\016\n\006vector\030\001 " + - "\003(\002\"\320\001\n\007AnnData\022\021\n\tfieldName\030\001 \001(\t\022;\n\004da" + - "ta\030\002 \003(\0132-.com.tencent.tcvectordb.rpc.pr" + - "oto.VectorArray\022\023\n\013documentIds\030\003 \003(\t\022>\n\006" + - "params\030\004 \001(\0132..com.tencent.tcvectordb.rp" + - "c.proto.SearchParams\022\r\n\005limit\030\005 \001(\r\022\021\n\td" + - "ata_expr\030\006 \003(\t\"W\n\021SparseVectorArray\022B\n\ts" + - "p_vector\030\001 \003(\0132/.com.tencent.tcvectordb." + - "rpc.proto.SparseVecItem\"q\n\nSparseData\022\021\n" + + "ngParams\022\017\n\007version\030\014 \001(\003\022>\n\tttlConfig\030\r" + + " \001(\0132+.com.tencent.tcvectordb.rpc.proto." + + "TTLConfig\022N\n\021filterIndexConfig\030\016 \001(\01323.c" + + "om.tencent.tcvectordb.rpc.proto.FilterIn" + + "dexConfig\032]\n\014IndexesEntry\022\013\n\003key\030\001 \001(\t\022<" + + "\n\005value\030\002 \001(\0132-.com.tencent.tcvectordb.r" + + "pc.proto.IndexColumn:\0028\001\"^\n\030CreateCollec" + + "tionResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022" + + "\020\n\010redirect\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(\004" + + "\"c\n\025DropCollectionRequest\022\020\n\010database\030\001 " + + "\001(\t\022\022\n\ncollection\030\002 \001(\t\022\r\n\005force\030\003 \001(\010\022\025" + + "\n\rwithout_alias\030\004 \001(\010\"\\\n\026DropCollectionR" + + "esponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010re" + + "direct\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(\004\"b\n\031T" + + "runcateCollectionRequest\022\020\n\010database\030\001 \001" + + "(\t\022\022\n\ncollection\030\002 \001(\t\022\037\n\027only_truncate_" + + "ann_index\030\003 \001(\010\"`\n\032TruncateCollectionRes" + + "ponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redi" + + "rect\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(\004\"\226\001\n\023Re" + + "buildIndexRequest\022\020\n\010database\030\001 \001(\t\022\022\n\nc" + + "ollection\030\002 \001(\t\022\031\n\021dropBeforeRebuild\030\003 \001" + + "(\010\022\020\n\010throttle\030\004 \001(\005\022\025\n\rdisable_train\030\005 " + + "\001(\010\022\025\n\rforce_rebuild\030\006 \001(\010\"U\n\024RebuildInd" + + "exResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n" + + "\010redirect\030\003 \001(\t\022\020\n\010task_ids\030\004 \003(\t\"\240\001\n\rUp" + + "sertRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollect" + + "ion\030\002 \001(\t\022\022\n\nbuildIndex\030\003 \001(\010\022=\n\tdocumen" + + "ts\030\004 \003(\0132*.com.tencent.tcvectordb.rpc.pr" + + "oto.Document\022\026\n\016buildIndexMode\030\005 \001(\t\"(\n\022" + + "EmbeddingExtraInfo\022\022\n\ntoken_used\030\001 \001(\004\"\271" + + "\001\n\016UpsertResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002" + + " \001(\t\022\020\n\010redirect\030\003 \001(\t\022\025\n\raffectedCount\030" + + "\004 \001(\004\022\017\n\007warning\030\005 \001(\t\022R\n\024embedding_extr" + + "a_info\030\006 \001(\01324.com.tencent.tcvectordb.rp" + + "c.proto.EmbeddingExtraInfo\"\255\001\n\rUpdateReq" + + "uest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection\030\002 \001" + + "(\t\022:\n\005query\030\003 \001(\0132+.com.tencent.tcvector" + + "db.rpc.proto.QueryCond\022:\n\006update\030\004 \001(\0132*" + + ".com.tencent.tcvectordb.rpc.proto.Docume" + + "nt\"\271\001\n\016UpdateResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003m" + + "sg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022\025\n\raffectedCo" + + "unt\030\004 \001(\004\022\017\n\007warning\030\005 \001(\t\022R\n\024embedding_" + + "extra_info\030\006 \001(\01324.com.tencent.tcvectord" + + "b.rpc.proto.EmbeddingExtraInfo\"q\n\rDelete" + + "Request\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection\030" + + "\002 \001(\t\022:\n\005query\030\003 \001(\0132+.com.tencent.tcvec" + + "tordb.rpc.proto.QueryCond\"T\n\016DeleteRespo" + + "nse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redire" + + "ct\030\003 \001(\t\022\025\n\raffectedCount\030\004 \001(\004\"\255\001\n\tQuer" + + "yCond\022\023\n\013documentIds\030\001 \003(\t\022\020\n\010indexIds\030\002" + + " \003(\004\022\026\n\016retrieveVector\030\003 \001(\010\022\016\n\006filter\030\004" + + " \001(\t\022\r\n\005limit\030\005 \001(\003\022\016\n\006offset\030\006 \001(\003\022\024\n\014o" + + "utputFields\030\007 \003(\t\022\034\n\024retrieveSparseVecto" + + "r\030\010 \001(\010\"\211\001\n\014QueryRequest\022\020\n\010database\030\001 \001" + + "(\t\022\022\n\ncollection\030\002 \001(\t\022:\n\005query\030\003 \001(\0132+." + + "com.tencent.tcvectordb.rpc.proto.QueryCo" + + "nd\022\027\n\017readConsistency\030\004 \001(\t\"\212\001\n\rQueryRes" + + "ponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redi" + + "rect\030\003 \001(\t\022=\n\tdocuments\030\004 \003(\0132*.com.tenc" + + "ent.tcvectordb.rpc.proto.Document\022\r\n\005cou" + + "nt\030\005 \001(\004\"M\n\014SearchResult\022=\n\tdocuments\030\001 " + + "\003(\0132*.com.tencent.tcvectordb.rpc.proto.D" + + "ocument\":\n\014SearchParams\022\016\n\006nprobe\030\001 \001(\r\022" + + "\n\n\002ef\030\002 \001(\r\022\016\n\006radius\030\003 \001(\002\"\035\n\013VectorArr" + + "ay\022\016\n\006vector\030\001 \003(\002\"\350\001\n\007AnnData\022\021\n\tfieldN" + + "ame\030\001 \001(\t\022;\n\004data\030\002 \003(\0132-.com.tencent.tc" + + "vectordb.rpc.proto.VectorArray\022\023\n\013docume" + + "ntIds\030\003 \003(\t\022>\n\006params\030\004 \001(\0132..com.tencen" + + "t.tcvectordb.rpc.proto.SearchParams\022\r\n\005l" + + "imit\030\005 \001(\r\022\021\n\tdata_expr\030\006 \003(\t\022\026\n\016embeddi" + + "ngItems\030\007 \003(\t\"W\n\021SparseVectorArray\022B\n\tsp" + + "_vector\030\001 \003(\0132/.com.tencent.tcvectordb.r" + + "pc.proto.SparseVecItem\"\267\001\n\nSparseData\022\021\n" + "\tfieldName\030\001 \001(\t\022A\n\004data\030\002 \003(\01323.com.ten" + "cent.tcvectordb.rpc.proto.SparseVectorAr" + - "ray\022\r\n\005limit\030\003 \001(\r\"\253\001\n\014RerankParams\022\016\n\006m" + - "ethod\030\001 \001(\t\022L\n\007weights\030\002 \003(\0132;.com.tence" + - "nt.tcvectordb.rpc.proto.RerankParams.Wei" + - "ghtsEntry\022\r\n\005rrf_k\030\003 \001(\005\032.\n\014WeightsEntry" + - "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\002:\0028\001\"\360\003\n\nSea" + - "rchCond\022>\n\007vectors\030\001 \003(\0132-.com.tencent.t" + - "cvectordb.rpc.proto.VectorArray\022\023\n\013docum" + - "entIds\030\002 \003(\t\022>\n\006params\030\003 \001(\0132..com.tence" + - "nt.tcvectordb.rpc.proto.SearchParams\022\016\n\006" + - "filter\030\004 \001(\t\022\026\n\016retrieveVector\030\005 \001(\010\022\r\n\005" + - "limit\030\006 \001(\r\022\024\n\014outputfields\030\007 \003(\t\022\026\n\016emb" + - "eddingItems\030\010 \003(\t\022\r\n\005range\030\t \001(\010\0226\n\003ann\030" + - "\n \003(\0132).com.tencent.tcvectordb.rpc.proto" + - ".AnnData\022<\n\006sparse\030\013 \003(\0132,.com.tencent.t" + - "cvectordb.rpc.proto.SparseData\022E\n\rrerank" + - "_params\030\014 \001(\0132..com.tencent.tcvectordb.r" + - "pc.proto.RerankParams\022\034\n\024retrieveSparseV" + - "ector\030\r \001(\010\"\214\001\n\rSearchRequest\022\020\n\010databas" + - "e\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022<\n\006search\030\003 " + - "\001(\0132,.com.tencent.tcvectordb.rpc.proto.S" + - "earchCond\022\027\n\017readConsistency\030\004 \001(\t\"4\n\rEx" + - "poseDataUni\022\023\n\013expose_name\030\001 \001(\t\022\016\n\006buff" + - "er\030\002 \001(\014\"V\n\nExposeData\022H\n\017expose_data_un" + - "i\030\001 \003(\0132/.com.tencent.tcvectordb.rpc.pro" + - "to.ExposeDataUni\"w\n\006Filter\022\014\n\004expr\030\001 \001(\t" + - "\022\016\n\006radius\030\002 \001(\002\022\014\n\004size\030\003 \001(\r\022A\n\013expose" + - "_data\030\004 \001(\0132,.com.tencent.tcvectordb.rpc" + - ".proto.ExposeData\"+\n\rRoaringBinary\022\014\n\004si" + - "ze\030\001 \001(\003\022\014\n\004data\030\002 \001(\014\"\343\001\n\016SearchRespons" + - "e\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect" + - "\030\003 \001(\t\022?\n\007results\030\004 \003(\0132..com.tencent.tc" + - "vectordb.rpc.proto.SearchResult\022\017\n\007warni" + - "ng\030\005 \001(\t\022R\n\024embedding_extra_info\030\006 \001(\01324" + - ".com.tencent.tcvectordb.rpc.proto.Embedd" + - "ingExtraInfo\":\n\010SortCond\022\020\n\010sort_vec\030\001 \003" + - "(\002\022\017\n\007sort_id\030\002 \001(\t\022\013\n\003ids\030\003 \003(\t\"\322\001\n\013Sor" + - "tRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection" + - "\030\002 \001(\t\022\021\n\tshard_idx\030\003 \001(\005\0228\n\004cond\030\004 \001(\0132" + - "*.com.tencent.tcvectordb.rpc.proto.SortC" + - "ond\022\r\n\005limit\030\005 \001(\r\022A\n\006metric\030\006 \001(\01621.com" + - ".tencent.tcvectordb.rpc.proto.IndexMetri" + - "cType\"\221\001\n\014SortResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003" + - "msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022=\n\tdocuments" + - "\030\004 \003(\0132*.com.tencent.tcvectordb.rpc.prot" + - "o.Document\022\025\n\rinvalid_conds\030\005 \003(\t\"_\n\017Dat" + - "abaseRequest\022\020\n\010database\030\001 \001(\t\022:\n\006dbType" + - "\030\002 \001(\0162*.com.tencent.tcvectordb.rpc.prot" + - "o.DataType\"\222\002\n\020DatabaseResponse\022\014\n\004code\030" + - "\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022\021\n\t" + - "databases\030\004 \003(\t\022\025\n\raffectedCount\030\005 \001(\004\022J" + - "\n\004info\030\006 \003(\0132<.com.tencent.tcvectordb.rp" + - "c.proto.DatabaseResponse.InfoEntry\032[\n\tIn" + - "foEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..co" + - "m.tencent.tcvectordb.rpc.proto.DatabaseI" + - "tem:\0028\001\"+\n\027DescribeDatabaseRequest\022\020\n\010da" + - "tabase\030\001 \001(\t\"\211\001\n\030DescribeDatabaseRespons" + - "e\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect" + - "\030\003 \001(\t\022@\n\010database\030\004 \001(\0132..com.tencent.t" + - "cvectordb.rpc.proto.DatabaseItem\"\023\n\021GetV" + - "ersionRequest\"?\n\022GetVersionResponse\022\021\n\tt" + - "imestamp\030\001 \001(\003\022\026\n\016kernal_version\030\002 \001(\003\"\201" + - "\002\n\017AddIndexRequest\022\020\n\010database\030\001 \001(\t\022\022\n\n" + - "collection\030\002 \001(\t\022O\n\007indexes\030\003 \003(\0132>.com." + - "tencent.tcvectordb.rpc.proto.AddIndexReq" + - "uest.IndexesEntry\022\030\n\020buildExistedData\030\004 " + - "\001(\010\032]\n\014IndexesEntry\022\013\n\003key\030\001 \001(\t\022<\n\005valu" + - "e\030\002 \001(\0132-.com.tencent.tcvectordb.rpc.pro" + - "to.IndexColumn:\0028\001\"?\n\020AddIndexResponse\022\014" + - "\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 " + - "\001(\t\"\r\n\013HttpRequest\"\016\n\014HttpResponse*s\n\016Sh" + - "ardDataState\022\025\n\021SHARD_INDEX_READY\020\000\022\030\n\024S" + - "HARD_INDEX_TRAINING\020\001\022\030\n\024SHARD_INDEX_BUI" + - "LDING\020\002\022\026\n\022SHARD_INDEX_FAILED\020\003*B\n\013Healt" + - "hState\022\020\n\014HEALTH_GREEN\020\000\022\021\n\rHEALTH_YELLO" + - "W\020\001\022\016\n\nHEALTH_RED\020\002* \n\010DataType\022\010\n\004BASE\020" + - "\000\022\n\n\006AI_DOC\020\001*y\n\017IndexMetricType\022\036\n\032INDE" + - "X_METRIC_INNER_PRODUCT\020\000\022\023\n\017INDEX_METRIC" + - "_L2\020\001\022\027\n\023INDEX_METRIC_COSINE\020\002\022\030\n\024INDEX_" + - "METRIC_HAMMING\020\003*W\n\017IndexEngineType\022\027\n\023E" + - "NGINE_FAISS_VECTOR\020\000\022\027\n\023ENGINE_FAISS_BIN" + - "ARY\020\001\022\022\n\016ENGINE_HNSWLIB\020\003*=\n\tFieldType\022\017" + - "\n\013TYPE_STRING\020\000\022\016\n\nTYPE_ARRAY\020\001\022\017\n\013TYPE_" + - "UINT64\020\002*+\n\020FieldElementType\022\027\n\023ELEMENT_" + - "TYPE_STRING\020\0002\374\025\n\014SearchEngine\022t\n\010setAli" + - "as\0221.com.tencent.tcvectordb.rpc.proto.Ad" + - "dAliasRequest\0325.com.tencent.tcvectordb.r" + - "pc.proto.UpdateAliasResponse\022q\n\010getAlias" + - "\0221.com.tencent.tcvectordb.rpc.proto.GetA" + - "liasRequest\0322.com.tencent.tcvectordb.rpc" + - ".proto.GetAliasResponse\022z\n\013deleteAlias\0224" + - ".com.tencent.tcvectordb.rpc.proto.Remove" + - "AliasRequest\0325.com.tencent.tcvectordb.rp" + - "c.proto.UpdateAliasResponse\022\211\001\n\020createCo" + - "llection\0229.com.tencent.tcvectordb.rpc.pr" + - "oto.CreateCollectionRequest\032:.com.tencen" + - "t.tcvectordb.rpc.proto.CreateCollectionR" + - "esponse\022\203\001\n\016dropCollection\0227.com.tencent" + - ".tcvectordb.rpc.proto.DropCollectionRequ" + - "est\0328.com.tencent.tcvectordb.rpc.proto.D" + - "ropCollectionResponse\022\217\001\n\022truncateCollec" + - "tion\022;.com.tencent.tcvectordb.rpc.proto." + - "TruncateCollectionRequest\032<.com.tencent." + - "tcvectordb.rpc.proto.TruncateCollectionR" + - "esponse\022\217\001\n\022describeCollection\022;.com.ten" + - "cent.tcvectordb.rpc.proto.DescribeCollec" + - "tionRequest\032<.com.tencent.tcvectordb.rpc" + - ".proto.DescribeCollectionResponse\022\206\001\n\017li" + - "stCollections\0228.com.tencent.tcvectordb.r" + - "pc.proto.ListCollectionsRequest\0329.com.te" + - "ncent.tcvectordb.rpc.proto.ListCollectio" + - "nsResponse\022}\n\014rebuildIndex\0225.com.tencent" + - ".tcvectordb.rpc.proto.RebuildIndexReques" + - "t\0326.com.tencent.tcvectordb.rpc.proto.Reb" + - "uildIndexResponse\022k\n\006upsert\022/.com.tencen" + - "t.tcvectordb.rpc.proto.UpsertRequest\0320.c" + - "om.tencent.tcvectordb.rpc.proto.UpsertRe" + - "sponse\022k\n\006update\022/.com.tencent.tcvectord" + - "b.rpc.proto.UpdateRequest\0320.com.tencent." + - "tcvectordb.rpc.proto.UpdateResponse\022h\n\005q" + - "uery\022..com.tencent.tcvectordb.rpc.proto." + - "QueryRequest\032/.com.tencent.tcvectordb.rp" + - "c.proto.QueryResponse\022k\n\006search\022/.com.te" + - "ncent.tcvectordb.rpc.proto.SearchRequest" + - "\0320.com.tencent.tcvectordb.rpc.proto.Sear" + - "chResponse\022r\n\rhybrid_search\022/.com.tencen" + - "t.tcvectordb.rpc.proto.SearchRequest\0320.c" + - "om.tencent.tcvectordb.rpc.proto.SearchRe" + - "sponse\022i\n\004dele\022/.com.tencent.tcvectordb." + - "rpc.proto.DeleteRequest\0320.com.tencent.tc" + - "vectordb.rpc.proto.DeleteResponse\022q\n\014ran" + - "ge_search\022/.com.tencent.tcvectordb.rpc.p" + + "ray\022\r\n\005limit\030\003 \001(\r\022D\n\006params\030\004 \001(\01324.com" + + ".tencent.tcvectordb.rpc.proto.SparseSear" + + "chParams\"\253\001\n\014RerankParams\022\016\n\006method\030\001 \001(" + + "\t\022L\n\007weights\030\002 \003(\0132;.com.tencent.tcvecto" + + "rdb.rpc.proto.RerankParams.WeightsEntry\022" + + "\r\n\005rrf_k\030\003 \001(\005\032.\n\014WeightsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\002:\0028\001\"\360\003\n\nSearchCond\022>\n" + + "\007vectors\030\001 \003(\0132-.com.tencent.tcvectordb." + + "rpc.proto.VectorArray\022\023\n\013documentIds\030\002 \003" + + "(\t\022>\n\006params\030\003 \001(\0132..com.tencent.tcvecto" + + "rdb.rpc.proto.SearchParams\022\016\n\006filter\030\004 \001" + + "(\t\022\026\n\016retrieveVector\030\005 \001(\010\022\r\n\005limit\030\006 \001(" + + "\r\022\024\n\014outputfields\030\007 \003(\t\022\026\n\016embeddingItem" + + "s\030\010 \003(\t\022\r\n\005range\030\t \001(\010\0226\n\003ann\030\n \003(\0132).co" + + "m.tencent.tcvectordb.rpc.proto.AnnData\022<" + + "\n\006sparse\030\013 \003(\0132,.com.tencent.tcvectordb." + + "rpc.proto.SparseData\022E\n\rrerank_params\030\014 " + + "\001(\0132..com.tencent.tcvectordb.rpc.proto.R" + + "erankParams\022\034\n\024retrieveSparseVector\030\r \001(" + + "\010\"\214\001\n\rSearchRequest\022\020\n\010database\030\001 \001(\t\022\022\n" + + "\ncollection\030\002 \001(\t\022<\n\006search\030\003 \001(\0132,.com." + + "tencent.tcvectordb.rpc.proto.SearchCond\022" + + "\027\n\017readConsistency\030\004 \001(\t\"4\n\rExposeDataUn" + + "i\022\023\n\013expose_name\030\001 \001(\t\022\016\n\006buffer\030\002 \001(\014\"V" + + "\n\nExposeData\022H\n\017expose_data_uni\030\001 \003(\0132/." + + "com.tencent.tcvectordb.rpc.proto.ExposeD" + + "ataUni\"w\n\006Filter\022\014\n\004expr\030\001 \001(\t\022\016\n\006radius" + + "\030\002 \001(\002\022\014\n\004size\030\003 \001(\r\022A\n\013expose_data\030\004 \001(" + + "\0132,.com.tencent.tcvectordb.rpc.proto.Exp" + + "oseData\"+\n\rRoaringBinary\022\014\n\004size\030\001 \001(\003\022\014" + + "\n\004data\030\002 \001(\014\"\343\001\n\016SearchResponse\022\014\n\004code\030" + + "\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022?\n\007" + + "results\030\004 \003(\0132..com.tencent.tcvectordb.r" + + "pc.proto.SearchResult\022\017\n\007warning\030\005 \001(\t\022R" + + "\n\024embedding_extra_info\030\006 \001(\01324.com.tence" + + "nt.tcvectordb.rpc.proto.EmbeddingExtraIn" + + "fo\":\n\010SortCond\022\020\n\010sort_vec\030\001 \003(\002\022\017\n\007sort" + + "_id\030\002 \001(\t\022\013\n\003ids\030\003 \003(\t\"\322\001\n\013SortRequest\022\020" + + "\n\010database\030\001 \001(\t\022\022\n\ncollection\030\002 \001(\t\022\021\n\t" + + "shard_idx\030\003 \001(\005\0228\n\004cond\030\004 \001(\0132*.com.tenc" + + "ent.tcvectordb.rpc.proto.SortCond\022\r\n\005lim" + + "it\030\005 \001(\r\022A\n\006metric\030\006 \001(\01621.com.tencent.t" + + "cvectordb.rpc.proto.IndexMetricType\"\221\001\n\014" + + "SortResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022" + + "\020\n\010redirect\030\003 \001(\t\022=\n\tdocuments\030\004 \003(\0132*.c" + + "om.tencent.tcvectordb.rpc.proto.Document" + + "\022\025\n\rinvalid_conds\030\005 \003(\t\"_\n\017DatabaseReque" + + "st\022\020\n\010database\030\001 \001(\t\022:\n\006dbType\030\002 \001(\0162*.c" + + "om.tencent.tcvectordb.rpc.proto.DataType" + + "\"\222\002\n\020DatabaseResponse\022\014\n\004code\030\001 \001(\005\022\013\n\003m" + + "sg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022\021\n\tdatabases\030" + + "\004 \003(\t\022\025\n\raffectedCount\030\005 \001(\004\022J\n\004info\030\006 \003" + + "(\0132<.com.tencent.tcvectordb.rpc.proto.Da" + + "tabaseResponse.InfoEntry\032[\n\tInfoEntry\022\013\n" + + "\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..com.tencent." + + "tcvectordb.rpc.proto.DatabaseItem:\0028\001\"+\n" + + "\027DescribeDatabaseRequest\022\020\n\010database\030\001 \001" + + "(\t\"\211\001\n\030DescribeDatabaseResponse\022\014\n\004code\030" + + "\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022@\n\010" + + "database\030\004 \001(\0132..com.tencent.tcvectordb." + + "rpc.proto.DatabaseItem\"\023\n\021GetVersionRequ" + + "est\"?\n\022GetVersionResponse\022\021\n\ttimestamp\030\001" + + " \001(\003\022\026\n\016kernal_version\030\002 \001(\003\"\201\002\n\017AddInde" + + "xRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollection" + + "\030\002 \001(\t\022O\n\007indexes\030\003 \003(\0132>.com.tencent.tc" + + "vectordb.rpc.proto.AddIndexRequest.Index" + + "esEntry\022\030\n\020buildExistedData\030\004 \001(\010\032]\n\014Ind" + + "exesEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-." + + "com.tencent.tcvectordb.rpc.proto.IndexCo" + + "lumn:\0028\001\"?\n\020AddIndexResponse\022\014\n\004code\030\001 \001" + + "(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\"\213\001\n\016Ex" + + "plainRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollec" + + "tion\030\002 \001(\t\022:\n\005query\030\003 \001(\0132+.com.tencent." + + "tcvectordb.rpc.proto.QueryCond\022\027\n\017readCo" + + "nsistency\030\004 \001(\t\"l\n\017ExplainResponse\022\014\n\004co" + + "de\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\022" + + "\025\n\raffectedTable\030\004 \003(\004\022\025\n\raffectedCount\030" + + "\005 \001(\004\"E\n\022SparseSearchParams\022\026\n\016terminate" + + "After\030\001 \001(\r\022\027\n\017cutoffFrequency\030\002 \001(\001\"\351\002\n" + + "\030ModifyVectorIndexRequest\022\020\n\010database\030\001 " + + "\001(\t\022\022\n\ncollection\030\002 \001(\t\022d\n\rvectorIndexes" + + "\030\003 \003(\0132M.com.tencent.tcvectordb.rpc.prot" + + "o.ModifyVectorIndexRequest.VectorIndexes" + + "Entry\022\017\n\007rebuild\030\004 \001(\010\022K\n\014rebuildRules\030\005" + + " \001(\01325.com.tencent.tcvectordb.rpc.proto." + + "RebuildIndexRequest\032c\n\022VectorIndexesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.com.tenc" + + "ent.tcvectordb.rpc.proto.IndexColumn:\0028\001" + + "\"H\n\031ModifyVectorIndexResponse\022\014\n\004code\030\001 " + + "\001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redirect\030\003 \001(\t\"p\n\014Co" + + "untRequest\022\020\n\010database\030\001 \001(\t\022\022\n\ncollecti" + + "on\030\002 \001(\t\022:\n\005query\030\003 \001(\0132+.com.tencent.tc" + + "vectordb.rpc.proto.QueryCond\"K\n\rCountRes" + + "ponse\022\014\n\004code\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\022\020\n\010redi" + + "rect\030\003 \001(\t\022\r\n\005count\030\004 \001(\004\"\r\n\013HttpRequest" + + "\"\016\n\014HttpResponse*s\n\016ShardDataState\022\025\n\021SH" + + "ARD_INDEX_READY\020\000\022\030\n\024SHARD_INDEX_TRAININ" + + "G\020\001\022\030\n\024SHARD_INDEX_BUILDING\020\002\022\026\n\022SHARD_I" + + "NDEX_FAILED\020\003*B\n\013HealthState\022\020\n\014HEALTH_G" + + "REEN\020\000\022\021\n\rHEALTH_YELLOW\020\001\022\016\n\nHEALTH_RED\020" + + "\002* \n\010DataType\022\010\n\004BASE\020\000\022\n\n\006AI_DOC\020\001*y\n\017I" + + "ndexMetricType\022\036\n\032INDEX_METRIC_INNER_PRO" + + "DUCT\020\000\022\023\n\017INDEX_METRIC_L2\020\001\022\027\n\023INDEX_MET" + + "RIC_COSINE\020\002\022\030\n\024INDEX_METRIC_HAMMING\020\003*W" + + "\n\017IndexEngineType\022\027\n\023ENGINE_FAISS_VECTOR" + + "\020\000\022\027\n\023ENGINE_FAISS_BINARY\020\001\022\022\n\016ENGINE_HN" + + "SWLIB\020\003*=\n\tFieldType\022\017\n\013TYPE_STRING\020\000\022\016\n" + + "\nTYPE_ARRAY\020\001\022\017\n\013TYPE_UINT64\020\002*+\n\020FieldE" + + "lementType\022\027\n\023ELEMENT_TYPE_STRING\020\0002\331\031\n\014" + + "SearchEngine\022t\n\010setAlias\0221.com.tencent.t" + + "cvectordb.rpc.proto.AddAliasRequest\0325.co" + + "m.tencent.tcvectordb.rpc.proto.UpdateAli" + + "asResponse\022q\n\010getAlias\0221.com.tencent.tcv" + + "ectordb.rpc.proto.GetAliasRequest\0322.com." + + "tencent.tcvectordb.rpc.proto.GetAliasRes" + + "ponse\022z\n\013deleteAlias\0224.com.tencent.tcvec" + + "tordb.rpc.proto.RemoveAliasRequest\0325.com" + + ".tencent.tcvectordb.rpc.proto.UpdateAlia" + + "sResponse\022\211\001\n\020createCollection\0229.com.ten" + + "cent.tcvectordb.rpc.proto.CreateCollecti" + + "onRequest\032:.com.tencent.tcvectordb.rpc.p" + + "roto.CreateCollectionResponse\022\203\001\n\016dropCo" + + "llection\0227.com.tencent.tcvectordb.rpc.pr" + + "oto.DropCollectionRequest\0328.com.tencent." + + "tcvectordb.rpc.proto.DropCollectionRespo" + + "nse\022\217\001\n\022truncateCollection\022;.com.tencent" + + ".tcvectordb.rpc.proto.TruncateCollection" + + "Request\032<.com.tencent.tcvectordb.rpc.pro" + + "to.TruncateCollectionResponse\022\217\001\n\022descri" + + "beCollection\022;.com.tencent.tcvectordb.rp" + + "c.proto.DescribeCollectionRequest\032<.com." + + "tencent.tcvectordb.rpc.proto.DescribeCol" + + "lectionResponse\022\206\001\n\017listCollections\0228.co" + + "m.tencent.tcvectordb.rpc.proto.ListColle" + + "ctionsRequest\0329.com.tencent.tcvectordb.r" + + "pc.proto.ListCollectionsResponse\022}\n\014rebu" + + "ildIndex\0225.com.tencent.tcvectordb.rpc.pr" + + "oto.RebuildIndexRequest\0326.com.tencent.tc" + + "vectordb.rpc.proto.RebuildIndexResponse\022" + + "k\n\006upsert\022/.com.tencent.tcvectordb.rpc.p" + + "roto.UpsertRequest\0320.com.tencent.tcvecto" + + "rdb.rpc.proto.UpsertResponse\022k\n\006update\022/" + + ".com.tencent.tcvectordb.rpc.proto.Update" + + "Request\0320.com.tencent.tcvectordb.rpc.pro" + + "to.UpdateResponse\022h\n\005query\022..com.tencent" + + ".tcvectordb.rpc.proto.QueryRequest\032/.com" + + ".tencent.tcvectordb.rpc.proto.QueryRespo" + + "nse\022k\n\006search\022/.com.tencent.tcvectordb.r" + + "pc.proto.SearchRequest\0320.com.tencent.tcv" + + "ectordb.rpc.proto.SearchResponse\022r\n\rhybr" + + "id_search\022/.com.tencent.tcvectordb.rpc.p" + "roto.SearchRequest\0320.com.tencent.tcvecto" + - "rdb.rpc.proto.SearchResponse\022e\n\004sort\022-.c" + - "om.tencent.tcvectordb.rpc.proto.SortRequ" + - "est\032..com.tencent.tcvectordb.rpc.proto.S" + - "ortResponse\022w\n\016createDatabase\0221.com.tenc" + - "ent.tcvectordb.rpc.proto.DatabaseRequest" + - "\0322.com.tencent.tcvectordb.rpc.proto.Data" + - "baseResponse\022u\n\014dropDatabase\0221.com.tence" + - "nt.tcvectordb.rpc.proto.DatabaseRequest\032" + - "2.com.tencent.tcvectordb.rpc.proto.Datab" + - "aseResponse\022v\n\rlistDatabases\0221.com.tence" + - "nt.tcvectordb.rpc.proto.DatabaseRequest\032" + - "2.com.tencent.tcvectordb.rpc.proto.Datab" + - "aseResponse\022\211\001\n\020describeDatabase\0229.com.t" + - "encent.tcvectordb.rpc.proto.DescribeData" + - "baseRequest\032:.com.tencent.tcvectordb.rpc" + - ".proto.DescribeDatabaseResponse\022x\n\013get_v" + - "ersion\0223.com.tencent.tcvectordb.rpc.prot" + - "o.GetVersionRequest\0324.com.tencent.tcvect" + - "ordb.rpc.proto.GetVersionResponse\022q\n\010add" + - "Index\0221.com.tencent.tcvectordb.rpc.proto" + - ".AddIndexRequest\0322.com.tencent.tcvectord" + - "b.rpc.proto.AddIndexResponseB\003\200\001\001b\006proto" + - "3" + "rdb.rpc.proto.SearchResponse\022r\n\016keyword_" + + "search\022/.com.tencent.tcvectordb.rpc.prot" + + "o.SearchRequest\032/.com.tencent.tcvectordb" + + ".rpc.proto.SearchRequest\022n\n\007explain\0220.co" + + "m.tencent.tcvectordb.rpc.proto.ExplainRe" + + "quest\0321.com.tencent.tcvectordb.rpc.proto" + + ".ExplainResponse\022i\n\004dele\022/.com.tencent.t" + + "cvectordb.rpc.proto.DeleteRequest\0320.com." + + "tencent.tcvectordb.rpc.proto.DeleteRespo" + + "nse\022q\n\014range_search\022/.com.tencent.tcvect" + + "ordb.rpc.proto.SearchRequest\0320.com.tence" + + "nt.tcvectordb.rpc.proto.SearchResponse\022e" + + "\n\004sort\022-.com.tencent.tcvectordb.rpc.prot" + + "o.SortRequest\032..com.tencent.tcvectordb.r" + + "pc.proto.SortResponse\022w\n\016createDatabase\022" + + "1.com.tencent.tcvectordb.rpc.proto.Datab" + + "aseRequest\0322.com.tencent.tcvectordb.rpc." + + "proto.DatabaseResponse\022u\n\014dropDatabase\0221" + + ".com.tencent.tcvectordb.rpc.proto.Databa" + + "seRequest\0322.com.tencent.tcvectordb.rpc.p" + + "roto.DatabaseResponse\022v\n\rlistDatabases\0221" + + ".com.tencent.tcvectordb.rpc.proto.Databa" + + "seRequest\0322.com.tencent.tcvectordb.rpc.p" + + "roto.DatabaseResponse\022\211\001\n\020describeDataba" + + "se\0229.com.tencent.tcvectordb.rpc.proto.De" + + "scribeDatabaseRequest\032:.com.tencent.tcve" + + "ctordb.rpc.proto.DescribeDatabaseRespons" + + "e\022x\n\013get_version\0223.com.tencent.tcvectord" + + "b.rpc.proto.GetVersionRequest\0324.com.tenc" + + "ent.tcvectordb.rpc.proto.GetVersionRespo" + + "nse\022q\n\010addIndex\0221.com.tencent.tcvectordb" + + ".rpc.proto.AddIndexRequest\0322.com.tencent" + + ".tcvectordb.rpc.proto.AddIndexResponse\022\214" + + "\001\n\021modifyVectorIndex\022:.com.tencent.tcvec", + "tordb.rpc.proto.ModifyVectorIndexRequest" + + "\032;.com.tencent.tcvectordb.rpc.proto.Modi" + + "fyVectorIndexResponse\022h\n\005count\022..com.ten" + + "cent.tcvectordb.rpc.proto.CountRequest\032/" + + ".com.tencent.tcvectordb.rpc.proto.CountR" + + "esponseB\003\200\001\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -81264,7 +88495,7 @@ public com.tencent.tcvectordb.rpc.proto.Olama.HttpResponse getDefaultInstanceFor internal_static_com_tencent_tcvectordb_rpc_proto_DatabaseItem_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_com_tencent_tcvectordb_rpc_proto_DatabaseItem_descriptor, - new java.lang.String[] { "CreateTime", "DbType", }); + new java.lang.String[] { "CreateTime", "DbType", "Count", }); internal_static_com_tencent_tcvectordb_rpc_proto_SnapshotRule_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_com_tencent_tcvectordb_rpc_proto_SnapshotRule_fieldAccessorTable = new @@ -81558,7 +88789,7 @@ public com.tencent.tcvectordb.rpc.proto.Olama.HttpResponse getDefaultInstanceFor internal_static_com_tencent_tcvectordb_rpc_proto_AnnData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_com_tencent_tcvectordb_rpc_proto_AnnData_descriptor, - new java.lang.String[] { "FieldName", "Data", "DocumentIds", "Params", "Limit", "DataExpr", }); + new java.lang.String[] { "FieldName", "Data", "DocumentIds", "Params", "Limit", "DataExpr", "EmbeddingItems", }); internal_static_com_tencent_tcvectordb_rpc_proto_SparseVectorArray_descriptor = getDescriptor().getMessageTypes().get(52); internal_static_com_tencent_tcvectordb_rpc_proto_SparseVectorArray_fieldAccessorTable = new @@ -81570,7 +88801,7 @@ public com.tencent.tcvectordb.rpc.proto.Olama.HttpResponse getDefaultInstanceFor internal_static_com_tencent_tcvectordb_rpc_proto_SparseData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_com_tencent_tcvectordb_rpc_proto_SparseData_descriptor, - new java.lang.String[] { "FieldName", "Data", "Limit", }); + new java.lang.String[] { "FieldName", "Data", "Limit", "Params", }); internal_static_com_tencent_tcvectordb_rpc_proto_RerankParams_descriptor = getDescriptor().getMessageTypes().get(54); internal_static_com_tencent_tcvectordb_rpc_proto_RerankParams_fieldAccessorTable = new @@ -81703,14 +88934,62 @@ public com.tencent.tcvectordb.rpc.proto.Olama.HttpResponse getDefaultInstanceFor com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_com_tencent_tcvectordb_rpc_proto_AddIndexResponse_descriptor, new java.lang.String[] { "Code", "Msg", "Redirect", }); - internal_static_com_tencent_tcvectordb_rpc_proto_HttpRequest_descriptor = + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_descriptor = getDescriptor().getMessageTypes().get(73); + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainRequest_descriptor, + new java.lang.String[] { "Database", "Collection", "Query", "ReadConsistency", }); + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_descriptor = + getDescriptor().getMessageTypes().get(74); + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_ExplainResponse_descriptor, + new java.lang.String[] { "Code", "Msg", "Redirect", "AffectedTable", "AffectedCount", }); + internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_descriptor = + getDescriptor().getMessageTypes().get(75); + internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_SparseSearchParams_descriptor, + new java.lang.String[] { "TerminateAfter", "CutoffFrequency", }); + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor = + getDescriptor().getMessageTypes().get(76); + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor, + new java.lang.String[] { "Database", "Collection", "VectorIndexes", "Rebuild", "RebuildRules", }); + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_VectorIndexesEntry_descriptor = + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_descriptor.getNestedTypes().get(0); + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_VectorIndexesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexRequest_VectorIndexesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_descriptor = + getDescriptor().getMessageTypes().get(77); + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_ModifyVectorIndexResponse_descriptor, + new java.lang.String[] { "Code", "Msg", "Redirect", }); + internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_descriptor = + getDescriptor().getMessageTypes().get(78); + internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_CountRequest_descriptor, + new java.lang.String[] { "Database", "Collection", "Query", }); + internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_descriptor = + getDescriptor().getMessageTypes().get(79); + internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_com_tencent_tcvectordb_rpc_proto_CountResponse_descriptor, + new java.lang.String[] { "Code", "Msg", "Redirect", "Count", }); + internal_static_com_tencent_tcvectordb_rpc_proto_HttpRequest_descriptor = + getDescriptor().getMessageTypes().get(80); internal_static_com_tencent_tcvectordb_rpc_proto_HttpRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_com_tencent_tcvectordb_rpc_proto_HttpRequest_descriptor, new java.lang.String[] { }); internal_static_com_tencent_tcvectordb_rpc_proto_HttpResponse_descriptor = - getDescriptor().getMessageTypes().get(74); + getDescriptor().getMessageTypes().get(81); internal_static_com_tencent_tcvectordb_rpc_proto_HttpResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_com_tencent_tcvectordb_rpc_proto_HttpResponse_descriptor, diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/SearchEngineGrpc.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/SearchEngineGrpc.java index c84273b..2d32941 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/SearchEngineGrpc.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/SearchEngineGrpc.java @@ -11,7 +11,7 @@ value = "by gRPC proto compiler", comments = "Source: olama.proto") @io.grpc.stub.annotations.GrpcGenerated -public final class SearchEngineGrpc { +public final class SearchEngineGrpc { private SearchEngineGrpc() {} @@ -452,6 +452,68 @@ com.tencent.tcvectordb.rpc.proto.Olama.SearchResponse> getHybridSearchMethod() { return getHybridSearchMethod; } + private static volatile io.grpc.MethodDescriptor getKeywordSearchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "keyword_search", + requestType = com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest.class, + responseType = com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getKeywordSearchMethod() { + io.grpc.MethodDescriptor getKeywordSearchMethod; + if ((getKeywordSearchMethod = SearchEngineGrpc.getKeywordSearchMethod) == null) { + synchronized (SearchEngineGrpc.class) { + if ((getKeywordSearchMethod = SearchEngineGrpc.getKeywordSearchMethod) == null) { + SearchEngineGrpc.getKeywordSearchMethod = getKeywordSearchMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "keyword_search")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest.getDefaultInstance())) + .setSchemaDescriptor(new SearchEngineMethodDescriptorSupplier("keyword_search")) + .build(); + } + } + } + return getKeywordSearchMethod; + } + + private static volatile io.grpc.MethodDescriptor getExplainMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = ApiPath.DOC_COUNT, + requestType = com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.class, + responseType = com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getExplainMethod() { + io.grpc.MethodDescriptor getExplainMethod; + if ((getExplainMethod = SearchEngineGrpc.getExplainMethod) == null) { + synchronized (SearchEngineGrpc.class) { + if ((getExplainMethod = SearchEngineGrpc.getExplainMethod) == null) { + SearchEngineGrpc.getExplainMethod = getExplainMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(ApiPath.DOC_COUNT) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse.getDefaultInstance())) + .setSchemaDescriptor(new SearchEngineMethodDescriptorSupplier(ApiPath.DOC_COUNT)) + .build(); + } + } + } + return getExplainMethod; + } + private static volatile io.grpc.MethodDescriptor getDeleMethod; @@ -731,6 +793,68 @@ com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse> getAddIndexMethod() { return getAddIndexMethod; } + private static volatile io.grpc.MethodDescriptor getModifyVectorIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = ApiPath.MODIFY_VECTOR_INDEX, + requestType = com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.class, + responseType = com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getModifyVectorIndexMethod() { + io.grpc.MethodDescriptor getModifyVectorIndexMethod; + if ((getModifyVectorIndexMethod = SearchEngineGrpc.getModifyVectorIndexMethod) == null) { + synchronized (SearchEngineGrpc.class) { + if ((getModifyVectorIndexMethod = SearchEngineGrpc.getModifyVectorIndexMethod) == null) { + SearchEngineGrpc.getModifyVectorIndexMethod = getModifyVectorIndexMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(ApiPath.MODIFY_VECTOR_INDEX) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse.getDefaultInstance())) + .setSchemaDescriptor(new SearchEngineMethodDescriptorSupplier(ApiPath.MODIFY_VECTOR_INDEX)) + .build(); + } + } + } + return getModifyVectorIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor getCountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = ApiPath.DOC_COUNT, + requestType = com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.class, + responseType = com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCountMethod() { + io.grpc.MethodDescriptor getCountMethod; + if ((getCountMethod = SearchEngineGrpc.getCountMethod) == null) { + synchronized (SearchEngineGrpc.class) { + if ((getCountMethod = SearchEngineGrpc.getCountMethod) == null) { + SearchEngineGrpc.getCountMethod = getCountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(ApiPath.DOC_COUNT) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse.getDefaultInstance())) + .setSchemaDescriptor(new SearchEngineMethodDescriptorSupplier(ApiPath.DOC_COUNT)) + .build(); + } + } + } + return getCountMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -919,6 +1043,26 @@ default void hybridSearch(com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest r io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHybridSearchMethod(), responseObserver); } + /** + *
+     * 关键词检索
+     * 
+ */ + default void keywordSearch(com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getKeywordSearchMethod(), responseObserver); + } + + /** + *
+     * explain
+     * 
+ */ + default void explain(com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExplainMethod(), responseObserver); + } + /** *
      * 删除向量
@@ -1008,6 +1152,23 @@ default void addIndex(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest req
         io.grpc.stub.StreamObserver responseObserver) {
       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddIndexMethod(), responseObserver);
     }
+
+    /**
+     * 
+     * 修改index配置
+     * 
+ */ + default void modifyVectorIndex(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getModifyVectorIndexMethod(), responseObserver); + } + + /** + */ + default void count(com.tencent.tcvectordb.rpc.proto.Olama.CountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCountMethod(), responseObserver); + } } /** @@ -1191,6 +1352,28 @@ public void hybridSearch(com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest re getChannel().newCall(getHybridSearchMethod(), getCallOptions()), request, responseObserver); } + /** + *
+     * 关键词检索
+     * 
+ */ + public void keywordSearch(com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getKeywordSearchMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * explain
+     * 
+ */ + public void explain(com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExplainMethod(), getCallOptions()), request, responseObserver); + } + /** *
      * 删除向量
@@ -1289,6 +1472,25 @@ public void addIndex(com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest requ
       io.grpc.stub.ClientCalls.asyncUnaryCall(
           getChannel().newCall(getAddIndexMethod(), getCallOptions()), request, responseObserver);
     }
+
+    /**
+     * 
+     * 修改index配置
+     * 
+ */ + public void modifyVectorIndex(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getModifyVectorIndexMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void count(com.tencent.tcvectordb.rpc.proto.Olama.CountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCountMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -1447,6 +1649,26 @@ public com.tencent.tcvectordb.rpc.proto.Olama.SearchResponse hybridSearch(com.te getChannel(), getHybridSearchMethod(), getCallOptions(), request); } + /** + *
+     * 关键词检索
+     * 
+ */ + public com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest keywordSearch(com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getKeywordSearchMethod(), getCallOptions(), request); + } + + /** + *
+     * explain
+     * 
+ */ + public com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse explain(com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExplainMethod(), getCallOptions(), request); + } + /** *
      * 删除向量
@@ -1536,6 +1758,23 @@ public com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse addIndex(com.tenc
       return io.grpc.stub.ClientCalls.blockingUnaryCall(
           getChannel(), getAddIndexMethod(), getCallOptions(), request);
     }
+
+    /**
+     * 
+     * 修改index配置
+     * 
+ */ + public com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse modifyVectorIndex(com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getModifyVectorIndexMethod(), getCallOptions(), request); + } + + /** + */ + public com.tencent.tcvectordb.rpc.proto.Olama.CountResponse count(com.tencent.tcvectordb.rpc.proto.Olama.CountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCountMethod(), getCallOptions(), request); + } } /** @@ -1708,6 +1947,28 @@ public com.google.common.util.concurrent.ListenableFuture + * 关键词检索 + *
+ */ + public com.google.common.util.concurrent.ListenableFuture keywordSearch( + com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getKeywordSearchMethod(), getCallOptions()), request); + } + + /** + *
+     * explain
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture explain( + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExplainMethod(), getCallOptions()), request); + } + /** *
      * 删除向量
@@ -1806,6 +2067,25 @@ public com.google.common.util.concurrent.ListenableFuture
+     * 修改index配置
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture modifyVectorIndex( + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getModifyVectorIndexMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture count( + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCountMethod(), getCallOptions()), request); + } } private static final int METHODID_SET_ALIAS = 0; @@ -1822,15 +2102,19 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1905,6 +2189,14 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.hybridSearch((com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_KEYWORD_SEARCH: + serviceImpl.keywordSearch((com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPLAIN: + serviceImpl.explain((com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_DELE: serviceImpl.dele((com.tencent.tcvectordb.rpc.proto.Olama.DeleteRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -1941,6 +2233,14 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.addIndex((com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_MODIFY_VECTOR_INDEX: + serviceImpl.modifyVectorIndex((com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_COUNT: + serviceImpl.count((com.tencent.tcvectordb.rpc.proto.Olama.CountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -2057,6 +2357,20 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest, com.tencent.tcvectordb.rpc.proto.Olama.SearchResponse>( service, METHODID_HYBRID_SEARCH))) + .addMethod( + getKeywordSearchMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest, + com.tencent.tcvectordb.rpc.proto.Olama.SearchRequest>( + service, METHODID_KEYWORD_SEARCH))) + .addMethod( + getExplainMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.tencent.tcvectordb.rpc.proto.Olama.ExplainRequest, + com.tencent.tcvectordb.rpc.proto.Olama.ExplainResponse>( + service, METHODID_EXPLAIN))) .addMethod( getDeleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2120,6 +2434,20 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.tencent.tcvectordb.rpc.proto.Olama.AddIndexRequest, com.tencent.tcvectordb.rpc.proto.Olama.AddIndexResponse>( service, METHODID_ADD_INDEX))) + .addMethod( + getModifyVectorIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexRequest, + com.tencent.tcvectordb.rpc.proto.Olama.ModifyVectorIndexResponse>( + service, METHODID_MODIFY_VECTOR_INDEX))) + .addMethod( + getCountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.tencent.tcvectordb.rpc.proto.Olama.CountRequest, + com.tencent.tcvectordb.rpc.proto.Olama.CountResponse>( + service, METHODID_COUNT))) .build(); } @@ -2182,6 +2510,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getQueryMethod()) .addMethod(getSearchMethod()) .addMethod(getHybridSearchMethod()) + .addMethod(getKeywordSearchMethod()) + .addMethod(getExplainMethod()) .addMethod(getDeleMethod()) .addMethod(getRangeSearchMethod()) .addMethod(getSortMethod()) @@ -2191,6 +2521,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDescribeDatabaseMethod()) .addMethod(getGetVersionMethod()) .addMethod(getAddIndexMethod()) + .addMethod(getModifyVectorIndexMethod()) + .addMethod(getCountMethod()) .build(); } } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/olama.proto b/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/olama.proto index 7b50351..8ea16d4 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/olama.proto +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/rpc/proto/olama.proto @@ -87,6 +87,7 @@ enum DataType { message DatabaseItem { int64 create_time = 1; DataType db_type = 2; + int64 count = 3; } message SnapshotRule { @@ -446,6 +447,7 @@ message AnnData { SearchParams params = 4; // 搜索参数 uint32 limit = 5; // 结果数量 repeated string data_expr = 6; // 表达式搜索 + repeated string embeddingItems = 7; // 使用embedding字段检索 } message SparseVectorArray { @@ -456,6 +458,7 @@ message SparseData { string fieldName = 1; // 字段名称 repeated SparseVectorArray data = 2; // 使用向量值检索 uint32 limit = 3; // 结果数量 + SparseSearchParams params = 4; // 搜索参数 } message RerankParams { @@ -586,6 +589,53 @@ message AddIndexResponse { string redirect = 3; }; +message ExplainRequest { + string database = 1; + string collection = 2; + QueryCond query = 3; + string readConsistency = 4; +}; + +message ExplainResponse { + int32 code = 1; + string msg = 2; + string redirect = 3; + repeated uint64 affectedTable = 4; + uint64 affectedCount = 5; +}; + +message SparseSearchParams { + uint32 terminateAfter = 1; // 搜索到指定数量的结果就终止 + double cutoffFrequency = 2; // 全文检索时过滤掉高频词 +} + +message ModifyVectorIndexRequest { + string database = 1; + string collection = 2; + map vectorIndexes = 3; + bool rebuild = 4; + RebuildIndexRequest rebuildRules = 5; +}; + +message ModifyVectorIndexResponse { + int32 code = 1; + string msg = 2; + string redirect = 3; +}; + +message CountRequest { + string database = 1; + string collection = 2; + QueryCond query = 3; +}; + +message CountResponse { + int32 code = 1; + string msg = 2; + string redirect = 3; + uint64 count = 4; +}; + message HttpRequest {}; message HttpResponse {}; @@ -622,6 +672,10 @@ service SearchEngine { rpc search(SearchRequest) returns (SearchResponse); // 混合搜索 rpc hybrid_search(SearchRequest) returns (SearchResponse); + // 关键词检索 + rpc keyword_search(SearchRequest) returns (SearchRequest); + // explain + rpc explain(ExplainRequest) returns (ExplainResponse); // 删除向量 rpc dele(DeleteRequest) returns (DeleteResponse); @@ -644,4 +698,8 @@ service SearchEngine { // 新增scalar的索引 rpc addIndex(AddIndexRequest) returns (AddIndexResponse); + // 修改index配置 + rpc modifyVectorIndex(ModifyVectorIndexRequest) returns (ModifyVectorIndexResponse); + + rpc count(CountRequest) returns (CountResponse); }; \ No newline at end of file diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/ApiPath.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/ApiPath.java index ef75417..7caf861 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/ApiPath.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/ApiPath.java @@ -40,6 +40,7 @@ public class ApiPath { public final static String DOC_HYBRID_SEARCH = "document/hybridSearch"; public final static String DOC_DELETE = "document/delete"; public final static String DOC_UPDATE = "document/update"; + public final static String DOC_COUNT = "document/count"; public final static String REBUILD_INDEX = "index/rebuild"; public final static String AI_DB_CREATE = "ai/database/create"; public final static String AI_DB_DROP = "ai/database/drop"; @@ -59,4 +60,5 @@ public class ApiPath { public final static String AI_ALIAS_DELETE = "ai/alias/delete"; public final static String AI_REBUILD_INDEX = "ai/index/rebuild"; public final static String ADD_INDEX = "index/add"; + public final static String MODIFY_VECTOR_INDEX = "index/modifyVectorIndex"; } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/GrpcStub.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/GrpcStub.java index 4a6d23d..0709d62 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/GrpcStub.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/GrpcStub.java @@ -20,6 +20,7 @@ package com.tencent.tcvectordb.service; +import com.fasterxml.jackson.databind.JsonNode; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.MessageOrBuilder; @@ -40,6 +41,7 @@ import com.tencent.tcvectordb.rpc.proto.Olama; import com.tencent.tcvectordb.rpc.proto.SearchEngineGrpc; import com.tencent.tcvectordb.service.param.*; +import com.tencent.tcvectordb.utils.JsonUtils; import io.grpc.*; import io.grpc.okhttp.OkHttpChannelBuilder; import org.apache.commons.lang3.tuple.Pair; @@ -225,11 +227,15 @@ public void createCollection(CreateCollectionParam params) { requestOrBuilder.addAllAliasList(params.getAlias()); } if (params.getEmbedding()!=null){ - requestOrBuilder.setEmbeddingParams(Olama.EmbeddingParams.newBuilder() - .setField(params.getEmbedding().getField()) - .setModelName(params.getEmbedding().getModel().getModelName()) - .setVectorField(params.getEmbedding().getVectorField()) - .build()); + Olama.EmbeddingParams.Builder embeddingBuilder = Olama.EmbeddingParams.newBuilder() + .setField(params.getEmbedding().getField()) + .setVectorField(params.getEmbedding().getVectorField()); + if (params.getEmbedding().getModel() != null) { + embeddingBuilder.setModelName(params.getEmbedding().getModel().getModelName()); + }else{ + embeddingBuilder.setModelName(params.getEmbedding().getModelName()); + } + requestOrBuilder.setEmbeddingParams(embeddingBuilder.build()); } if (params.getTtlConfig()!=null){ requestOrBuilder.setTtlConfig(Olama.TTLConfig.newBuilder() @@ -238,11 +244,16 @@ public void createCollection(CreateCollectionParam params) { .build()); } if (params.getFilterIndexConfig()!=null){ - requestOrBuilder.setFilterIndexConfig(Olama.FilterIndexConfig.newBuilder() - .setFilterAll(params.getFilterIndexConfig().isFilterAll()) - .addAllFieldsWithoutIndex(params.getFilterIndexConfig().getFieldWithoutFilterIndex()) - .setMaxStrLen(params.getFilterIndexConfig().getMaxStrLen()) - .build()); + Olama.FilterIndexConfig.Builder filterBuilder = Olama.FilterIndexConfig.newBuilder(). + setFilterAll(params.getFilterIndexConfig().isFilterAll()); + if (params.getFilterIndexConfig().getFieldsWithoutIndex()!=null){ + filterBuilder.addAllFieldsWithoutIndex(params.getFilterIndexConfig().getFieldsWithoutIndex()); + } + if(params.getFilterIndexConfig().getMaxStrLen()!=null){ + filterBuilder.setMaxStrLen(params.getFilterIndexConfig().getMaxStrLen()); + } + requestOrBuilder.setFilterIndexConfig(filterBuilder.build()); + } if (params.getIndexes() != null && !params.getIndexes().isEmpty()){ for (IndexField index : params.getIndexes()) { @@ -269,34 +280,35 @@ public void createCollection(CreateCollectionParam params) { private static Olama.IndexColumn.Builder getRpcIndexBuilder(IndexField index) { Olama.IndexColumn.Builder indexBuilder = Olama.IndexColumn.newBuilder() .setFieldName(index.getFieldName()) - .setFieldType(index.getFieldType().getValue()) - .setIndexType(index.getIndexType().getValue()); + .setFieldType(index.getFieldType().getValue()); + if (index.getIndexType()!=null){ + indexBuilder.setIndexType(index.getIndexType().getValue()); + } if(index.isVectorField()){ - indexBuilder.setDimension(index.getDimension()); - indexBuilder.setMetricType(index.getMetricType().getValue()); + if(index.getDimension()!=null){ + indexBuilder.setDimension(index.getDimension()); + } + if (index.getMetricType()!=null) { + indexBuilder.setMetricType(index.getMetricType().getValue()); + } if(index.getParams()!=null){ - switch (index.getIndexType()) { - case HNSW: - HNSWParams hnswParams = (HNSWParams) index.getParams(); - indexBuilder.setParams(Olama.IndexParams.newBuilder() - .setM(hnswParams.getM()) - .setEfConstruction(hnswParams.getEfConstruction()).build()); - break; - case IVF_FLAT: - IVFFLATParams ivfflatParams = (IVFFLATParams) index.getParams(); - indexBuilder.setParams(Olama.IndexParams.newBuilder() - .setNlist(ivfflatParams.getNList()).build()); - break; - case IVF_PQ: - IVFPQParams ivfpqParams = (IVFPQParams) index.getParams(); - indexBuilder.setParams(Olama.IndexParams.newBuilder() - .setNlist(ivfpqParams.getNList()).setM(ivfpqParams.getM()).build()); - break; - case IVF_SQ8: - IVFSQ8Params ivfsq8Params = (IVFSQ8Params) index.getParams(); - indexBuilder.setParams(Olama.IndexParams.newBuilder() - .setNlist(ivfsq8Params.getNList()).build()); - break; + if(index.getParams() instanceof HNSWParams) { + HNSWParams hnswParams = (HNSWParams) index.getParams(); + indexBuilder.setParams(Olama.IndexParams.newBuilder() + .setM(hnswParams.getM()) + .setEfConstruction(hnswParams.getEfConstruction()).build()); + }else if(index.getParams() instanceof IVFFLATParams) { + IVFFLATParams ivfflatParams = (IVFFLATParams) index.getParams(); + indexBuilder.setParams(Olama.IndexParams.newBuilder() + .setNlist(ivfflatParams.getNList()).build()); + }else if (index.getParams() instanceof IVFPQParams) { + IVFPQParams ivfpqParams = (IVFPQParams) index.getParams(); + indexBuilder.setParams(Olama.IndexParams.newBuilder() + .setNlist(ivfpqParams.getNList()).setM(ivfpqParams.getM()).build()); + }else if(index.getParams() instanceof IVFSQ8Params) { + IVFSQ8Params ivfsq8Params = (IVFSQ8Params) index.getParams(); + indexBuilder.setParams(Olama.IndexParams.newBuilder() + .setNlist(ivfsq8Params.getNList()).build()); } } } @@ -567,6 +579,11 @@ public SearchRes searchDocument(SearchParamInner param, DataBaseTypeEnum dbType) searchConBuilder.setParams(Olama.SearchParams.newBuilder().setEf(params.getEf()).build()); } } + + if (searchParam.getRadius()!=null){ + searchConBuilder.setRange(true); + searchConBuilder.getParamsBuilder().setRadius(searchParam.getRadius()); + } builder.setSearch(searchConBuilder.build()); logQuery(ApiPath.DOC_SEARCH, builder); Olama.SearchResponse searchResponse = this.blockingStub.withDeadlineAfter(this.timeout, TimeUnit.SECONDS).search(builder.build()); @@ -611,7 +628,7 @@ public HybridSearchRes hybridSearchDocument(HybridSearchParamInner param, boolea } if (annOption.getData()!=null){ if (annOption.getData().get(0) instanceof String){ - annBuilder.addAllDataExpr(annOption.getData().stream().map(item->(String)item).collect(Collectors.toList())); + annBuilder.addAllEmbeddingItems(annOption.getData().stream().map(item->(String)item).collect(Collectors.toList())); }if (annOption.getData().get(0) instanceof List){ annBuilder.addAllData(annOption.getData().stream() .map(item-> Olama.VectorArray.newBuilder().addAllVector(((List)item). @@ -645,6 +662,17 @@ public HybridSearchRes hybridSearchDocument(HybridSearchParamInner param, boolea if(matchOption.getLimit()!=null){ sparseBuilder.setLimit(matchOption.getLimit()); } + + if (matchOption.getCutoffFrequency()!=null || matchOption.getTerminateAfter()!=null){ + Olama.SparseSearchParams.Builder sparseSearchParamsBuilder = Olama.SparseSearchParams.newBuilder(); + if (matchOption.getCutoffFrequency()!=null){ + sparseSearchParamsBuilder.setCutoffFrequency(matchOption.getCutoffFrequency()); + } + if (matchOption.getTerminateAfter()!=null){ + sparseSearchParamsBuilder.setTerminateAfter(matchOption.getTerminateAfter()); + } + sparseBuilder.setParams(sparseSearchParamsBuilder.build()).build(); + } return sparseBuilder.build(); }).collect(Collectors.toList())); } @@ -717,6 +745,9 @@ public AffectRes deleteDocument(DeleteParamInner param) { if (paramQuery.getFilter()!=null && !paramQuery.getFilter().isEmpty()){ queryCondBuilder.setFilter(paramQuery.getFilter()); } + if(param.getQuery().getLimit()!=null){ + queryCondBuilder.setLimit(param.getQuery().getLimit()); + } Olama.DeleteRequest deleteRequest = Olama.DeleteRequest.newBuilder() .setDatabase(param.getDatabase()) .setCollection(param.getCollection()) @@ -876,6 +907,61 @@ public BaseRes rebuildAIIndex(RebuildIndexParamInner param) { return super.rebuildAIIndex(param); } + public BaseRes countDocument(QueryCountParamInner param, boolean ai) { + Olama.CountRequest.Builder builder = Olama.CountRequest.newBuilder() + .setDatabase(param.getDatabase()) + .setCollection(param.getCollection()); + if (param.getQuery()!=null) { + Olama.QueryCond.Builder queryBuilder = Olama.QueryCond.newBuilder(); + if (param.getQuery().getFilter()!=null){ + queryBuilder.setFilter(param.getQuery().getFilter()); + } + builder.setQuery(queryBuilder.build()); + } + Olama.CountRequest countRequest = builder.build(); + logQuery(ApiPath.DOC_COUNT, builder); + Olama.CountResponse countResponse = this.blockingStub.withDeadlineAfter(this.timeout, TimeUnit.SECONDS).count(countRequest); + logResponse(ApiPath.DOC_COUNT, countResponse); + if(countResponse==null){ + throw new VectorDBException("VectorDBServer error: count not response"); + } + if (countResponse.getCode()!=0){ + throw new VectorDBException(String.format( + "VectorDBServer error: count not Success, body code=%s, message=%s", + countResponse.getCode(), countResponse.getMsg())); + } + return new BaseRes(countResponse.getCode(), countResponse.getMsg(),"", countResponse.getCount()); + } + + @Override + public BaseRes modifyVectorIndex(ModifyIndexParamInner param, boolean ai) { + Olama.ModifyVectorIndexRequest.Builder builder = Olama.ModifyVectorIndexRequest.newBuilder() + .setDatabase(param.getDatabase()) + .setCollection(param.getCollection()); + if (param.getRebuildRules()!=null){ + builder.setRebuildRules(Olama.RebuildIndexRequest.newBuilder() + .setDropBeforeRebuild(param.getRebuildRules().getDropBeforeRebuild()) + .setThrottle(param.getRebuildRules().getThrottle()).build()); + } + if (param.getVectorIndexes() !=null && !param.getVectorIndexes().isEmpty()){ + builder.putAllVectorIndexes(param.getVectorIndexes().stream() + .map(indexField -> getRpcIndexBuilder(indexField).build()).collect(Collectors.toMap(index -> index.getFieldName(), index -> index))); + } + logQuery(ApiPath.MODIFY_VECTOR_INDEX, builder); + Olama.ModifyVectorIndexResponse modifyVectorIndexResponse = this.blockingStub.withDeadlineAfter(this.timeout, TimeUnit.SECONDS) + .modifyVectorIndex(builder.build()); + logResponse(ApiPath.MODIFY_VECTOR_INDEX, modifyVectorIndexResponse); + if(modifyVectorIndexResponse==null){ + throw new VectorDBException("VectorDBServer error: modifyVectorIndex not response"); + } + if (modifyVectorIndexResponse.getCode()!=0){ + throw new VectorDBException(String.format( + "VectorDBServer error: modifyVectorIndex not Success, body code=%s, message=%s", + modifyVectorIndexResponse.getCode(), modifyVectorIndexResponse.getMsg())); + } + return new BaseRes(modifyVectorIndexResponse.getCode(), modifyVectorIndexResponse.getMsg(), ""); + } + @Override public BaseRes addIndex(AddIndexParamInner addIndexParamInner) { @@ -974,7 +1060,7 @@ private static Olama.Document convertDocument2OlamaDoc(Document document) { } if (document.getVector()!=null){ if (document.getVector() instanceof List){ - docBuilder.addAllVector(((List)document.getVector()).stream().map(ele->ele.floatValue()).collect(Collectors.toList())); + docBuilder.addAllVector(((List)document.getVector()).stream().map(ele->ele.floatValue()).collect(Collectors.toList())); }else if (document.getVector() instanceof String){ docBuilder.setDataExpr((String)document.getVector()); } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/HttpStub.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/HttpStub.java index ed38dd4..ce7b497 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/HttpStub.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/HttpStub.java @@ -377,6 +377,19 @@ public AffectRes updateDocument(UpdateParamInner param, boolean ai) { return JsonUtils.parseObject(jsonNode.toString(), AffectRes.class); } + public BaseRes countDocument(QueryCountParamInner param, boolean ai) { + String url = String.format("%s/%s", this.connectParam.getUrl(), ApiPath.DOC_COUNT); + JsonNode jsonNode = this.post(url, param.toString(), ai); + return JsonUtils.parseObject(jsonNode.toString(), AffectRes.class); + } + + @Override + public BaseRes modifyVectorIndex(ModifyIndexParamInner param, boolean ai) { + String url = String.format("%s/%s", this.connectParam.getUrl(), ApiPath.MODIFY_VECTOR_INDEX); + JsonNode jsonNode = this.post(url, param.toString(), ai); + return JsonUtils.parseObject(jsonNode.toString(), AffectRes.class); + } + @Override public BaseRes rebuildIndex(RebuildIndexParamInner param) { String url = String.format("%s/%s", this.connectParam.getUrl(), ApiPath.REBUILD_INDEX); diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/Stub.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/Stub.java index 8a45659..f5e8f93 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/Stub.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/Stub.java @@ -183,4 +183,8 @@ GetChunksRes getChunks(String databaseName, String collectionName, String docume BaseRes addIndex(AddIndexParamInner addIndexParamInner); void close(); + + BaseRes countDocument(QueryCountParamInner param, boolean ai); + + BaseRes modifyVectorIndex(ModifyIndexParamInner param, boolean ai); } diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/ModifyIndexParamInner.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/ModifyIndexParamInner.java new file mode 100644 index 0000000..66008d5 --- /dev/null +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/ModifyIndexParamInner.java @@ -0,0 +1,45 @@ +package com.tencent.tcvectordb.service.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.tencent.tcvectordb.model.param.collection.VectorIndex; +import com.tencent.tcvectordb.model.param.dml.ModifyVectorIndexParam; +import com.tencent.tcvectordb.model.param.dml.RebuildIndexParam; +import com.tencent.tcvectordb.utils.JsonUtils; + +import java.util.List; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ModifyIndexParamInner { + private String database; + private String collection; + private RebuildIndexParam rebuildRules; + private List vectorIndexes; + + public ModifyIndexParamInner(String database, String collection, ModifyVectorIndexParam modifyVectorIndexParam) { + this.database = database; + this.collection = collection; + this.rebuildRules = modifyVectorIndexParam.getRebuildRules(); + this.vectorIndexes = modifyVectorIndexParam.getVectorIndexes(); + } + + public String getDatabase() { + return database; + } + + public String getCollection() { + return collection; + } + + public RebuildIndexParam getRebuildRules() { + return rebuildRules; + } + + public List getVectorIndexes() { + return vectorIndexes; + } + + @Override + public String toString() { + return JsonUtils.toJsonString(this); + } +} diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/QueryCountParamInner.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/QueryCountParamInner.java new file mode 100644 index 0000000..eeadef1 --- /dev/null +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/QueryCountParamInner.java @@ -0,0 +1,49 @@ +package com.tencent.tcvectordb.service.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.tencent.tcvectordb.exception.ParamException; +import com.tencent.tcvectordb.model.param.dml.CountQueryParam; +import com.tencent.tcvectordb.model.param.dml.QueryParam; +import com.tencent.tcvectordb.model.param.enums.ReadConsistencyEnum; +import com.tencent.tcvectordb.utils.JsonUtils; + +/** + * Inner Query Param + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class QueryCountParamInner { + private String database; + private String collection; + private ReadConsistencyEnum readConsistency; + private CountQueryParam query; + + public QueryCountParamInner(String database, String collection, CountQueryParam query, ReadConsistencyEnum readConsistency) { + this.database = database; + this.collection = collection; + this.readConsistency = readConsistency; + this.query = query; + } + + public String getDatabase() { + return database; + } + + public String getCollection() { + return collection; + } + + public ReadConsistencyEnum getReadConsistency() { + return readConsistency; + } + + public CountQueryParam getQuery() { + return query; + } + + @Override + public String toString() { + return JsonUtils.toJsonString(this); + } +} diff --git a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/RebuildIndexParamInner.java b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/RebuildIndexParamInner.java index e311398..9e8840d 100644 --- a/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/RebuildIndexParamInner.java +++ b/tcvectordb/src/main/java/com/tencent/tcvectordb/service/param/RebuildIndexParamInner.java @@ -15,7 +15,7 @@ public class RebuildIndexParamInner { public RebuildIndexParamInner(String database, String collection, RebuildIndexParam rebuildIndexParam) { this.database = database; this.collection = collection; - this.dropBeforeRebuild = rebuildIndexParam.dropBeforeRebuild(); + this.dropBeforeRebuild = rebuildIndexParam.getDropBeforeRebuild(); this.throttle = rebuildIndexParam.getThrottle(); }