瀏覽代碼

update proto

Signed-off-by: Zhiru Zhu <zzhu@fandm.edu>
Zhiru Zhu 5 年之前
父節點
當前提交
748f8c6409
共有 3 個文件被更改,包括 120 次插入111 次删除
  1. 44 44
      src/main/java/io/milvus/client/MilvusGrpcClient.java
  2. 74 65
      src/main/proto/milvus.proto
  3. 2 2
      src/main/proto/status.proto

+ 44 - 44
src/main/java/io/milvus/client/MilvusGrpcClient.java

@@ -161,9 +161,9 @@ public class MilvusGrpcClient implements MilvusClient {
       return new Response(Response.Status.CLIENT_NOT_CONNECTED);
     }
 
-    TableSchema request =
-        TableSchema.newBuilder()
-            .setTableName(collectionMapping.getCollectionName())
+    CollectionSchema request =
+        CollectionSchema.newBuilder()
+            .setCollectionName(collectionMapping.getCollectionName())
             .setDimension(collectionMapping.getDimension())
             .setIndexFileSize(collectionMapping.getIndexFileSize())
             .setMetricType(collectionMapping.getMetricType().getVal())
@@ -172,7 +172,7 @@ public class MilvusGrpcClient implements MilvusClient {
     Status response;
 
     try {
-      response = blockingStub.createTable(request);
+      response = blockingStub.createCollection(request);
 
       if (response.getErrorCode() == ErrorCode.SUCCESS) {
         logInfo("Created collection successfully!\n{0}", collectionMapping.toString());
@@ -202,11 +202,11 @@ public class MilvusGrpcClient implements MilvusClient {
       return new HasCollectionResponse(new Response(Response.Status.CLIENT_NOT_CONNECTED), false);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     BoolReply response;
 
     try {
-      response = blockingStub.hasTable(request);
+      response = blockingStub.hasCollection(request);
 
       if (response.getStatus().getErrorCode() == ErrorCode.SUCCESS) {
         logInfo("hasCollection `{0}` = {1}", collectionName, response.getBoolReply());
@@ -235,11 +235,11 @@ public class MilvusGrpcClient implements MilvusClient {
       return new Response(Response.Status.CLIENT_NOT_CONNECTED);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     Status response;
 
     try {
-      response = blockingStub.dropTable(request);
+      response = blockingStub.dropCollection(request);
 
       if (response.getErrorCode() == ErrorCode.SUCCESS) {
         logInfo("Dropped collection `{0}` successfully!", collectionName);
@@ -267,7 +267,7 @@ public class MilvusGrpcClient implements MilvusClient {
         KeyValuePair.newBuilder().setKey(extraParamKey).setValue(index.getParamsInJson()).build();
     IndexParam request =
         IndexParam.newBuilder()
-            .setTableName(index.getCollectionName())
+            .setCollectionName(index.getCollectionName())
             .setIndexType(index.getIndexType().getVal())
             .addExtraParams(extraParam)
             .build();
@@ -303,7 +303,7 @@ public class MilvusGrpcClient implements MilvusClient {
         KeyValuePair.newBuilder().setKey(extraParamKey).setValue(index.getParamsInJson()).build();
     IndexParam request =
         IndexParam.newBuilder()
-            .setTableName(index.getCollectionName())
+            .setCollectionName(index.getCollectionName())
             .setIndexType(index.getIndexType().getVal())
             .addExtraParams(extraParam)
             .build();
@@ -344,7 +344,7 @@ public class MilvusGrpcClient implements MilvusClient {
     }
 
     PartitionParam request =
-        PartitionParam.newBuilder().setTableName(collectionName).setTag(tag).build();
+        PartitionParam.newBuilder().setCollectionName(collectionName).setTag(tag).build();
 
     Status response;
 
@@ -376,7 +376,7 @@ public class MilvusGrpcClient implements MilvusClient {
           new Response(Response.Status.CLIENT_NOT_CONNECTED), new ArrayList<>());
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     PartitionList response;
 
     try {
@@ -412,7 +412,7 @@ public class MilvusGrpcClient implements MilvusClient {
     }
 
     PartitionParam request =
-        PartitionParam.newBuilder().setTableName(collectionName).setTag(tag).build();
+        PartitionParam.newBuilder().setCollectionName(collectionName).setTag(tag).build();
     Status response;
 
     try {
@@ -448,7 +448,7 @@ public class MilvusGrpcClient implements MilvusClient {
 
     io.milvus.grpc.InsertParam request =
         io.milvus.grpc.InsertParam.newBuilder()
-            .setTableName(insertParam.getCollectionName())
+            .setCollectionName(insertParam.getCollectionName())
             .addAllRowRecordArray(rowRecordList)
             .addAllRowIdArray(insertParam.getVectorIds())
             .setPartitionTag(insertParam.getPartitionTag())
@@ -494,7 +494,7 @@ public class MilvusGrpcClient implements MilvusClient {
 
     io.milvus.grpc.InsertParam request =
         io.milvus.grpc.InsertParam.newBuilder()
-            .setTableName(insertParam.getCollectionName())
+            .setCollectionName(insertParam.getCollectionName())
             .addAllRowRecordArray(rowRecordList)
             .addAllRowIdArray(insertParam.getVectorIds())
             .setPartitionTag(insertParam.getPartitionTag())
@@ -563,7 +563,7 @@ public class MilvusGrpcClient implements MilvusClient {
 
     io.milvus.grpc.SearchParam request =
         io.milvus.grpc.SearchParam.newBuilder()
-            .setTableName(searchParam.getCollectionName())
+            .setCollectionName(searchParam.getCollectionName())
             .addAllQueryRecordArray(rowRecordList)
             .addAllPartitionTagArray(searchParam.getPartitionTags())
             .setTopk(searchParam.getTopK())
@@ -620,7 +620,7 @@ public class MilvusGrpcClient implements MilvusClient {
 
     io.milvus.grpc.SearchParam request =
         io.milvus.grpc.SearchParam.newBuilder()
-            .setTableName(searchParam.getCollectionName())
+            .setCollectionName(searchParam.getCollectionName())
             .addAllQueryRecordArray(rowRecordList)
             .addAllPartitionTagArray(searchParam.getPartitionTags())
             .setTopk(searchParam.getTopK())
@@ -693,7 +693,7 @@ public class MilvusGrpcClient implements MilvusClient {
 
     io.milvus.grpc.SearchParam constructSearchParam =
         io.milvus.grpc.SearchParam.newBuilder()
-            .setTableName(searchParam.getCollectionName())
+            .setCollectionName(searchParam.getCollectionName())
             .addAllQueryRecordArray(rowRecordList)
             .addAllPartitionTagArray(searchParam.getPartitionTags())
             .setTopk(searchParam.getTopK())
@@ -745,15 +745,15 @@ public class MilvusGrpcClient implements MilvusClient {
           new Response(Response.Status.CLIENT_NOT_CONNECTED), null);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
-    TableSchema response;
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
+    CollectionSchema response;
 
     try {
-      response = blockingStub.describeTable(request);
+      response = blockingStub.describeCollection(request);
 
       if (response.getStatus().getErrorCode() == ErrorCode.SUCCESS) {
         CollectionMapping collectionMapping =
-            new CollectionMapping.Builder(response.getTableName(), response.getDimension())
+            new CollectionMapping.Builder(response.getCollectionName(), response.getDimension())
                 .withIndexFileSize(response.getIndexFileSize())
                 .withMetricType(MetricType.valueOf(response.getMetricType()))
                 .build();
@@ -787,13 +787,13 @@ public class MilvusGrpcClient implements MilvusClient {
     }
 
     Command request = Command.newBuilder().setCmd("").build();
-    TableNameList response;
+    CollectionNameList response;
 
     try {
-      response = blockingStub.showTables(request);
+      response = blockingStub.showCollections(request);
 
       if (response.getStatus().getErrorCode() == ErrorCode.SUCCESS) {
-        List<String> collectionNames = response.getTableNamesList();
+        List<String> collectionNames = response.getCollectionNamesList();
         logInfo("Current collections: {0}", collectionNames.toString());
         return new ShowCollectionsResponse(new Response(Response.Status.SUCCESS), collectionNames);
       } else {
@@ -820,14 +820,14 @@ public class MilvusGrpcClient implements MilvusClient {
           new Response(Response.Status.CLIENT_NOT_CONNECTED), 0);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
-    TableRowCount response;
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
+    CollectionRowCount response;
 
     try {
-      response = blockingStub.countTable(request);
+      response = blockingStub.countCollection(request);
 
       if (response.getStatus().getErrorCode() == ErrorCode.SUCCESS) {
-        long collectionRowCount = response.getTableRowCount();
+        long collectionRowCount = response.getCollectionRowCount();
         logInfo("Collection `{0}` has {1} rows", collectionName, collectionRowCount);
         return new GetCollectionRowCountResponse(
             new Response(Response.Status.SUCCESS), collectionRowCount);
@@ -894,11 +894,11 @@ public class MilvusGrpcClient implements MilvusClient {
       return new Response(Response.Status.CLIENT_NOT_CONNECTED);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     Status response;
 
     try {
-      response = blockingStub.preloadTable(request);
+      response = blockingStub.preloadCollection(request);
 
       if (response.getErrorCode() == ErrorCode.SUCCESS) {
         logInfo("Preloaded collection `{0}` successfully!", collectionName);
@@ -922,7 +922,7 @@ public class MilvusGrpcClient implements MilvusClient {
       return new DescribeIndexResponse(new Response(Response.Status.CLIENT_NOT_CONNECTED), null);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     IndexParam response;
 
     try {
@@ -936,7 +936,7 @@ public class MilvusGrpcClient implements MilvusClient {
           }
         }
         Index index =
-            new Index.Builder(response.getTableName(), IndexType.valueOf(response.getIndexType()))
+            new Index.Builder(response.getCollectionName(), IndexType.valueOf(response.getIndexType()))
                 .withParamsInJson(extraParam)
                 .build();
         logInfo(
@@ -966,7 +966,7 @@ public class MilvusGrpcClient implements MilvusClient {
       return new Response(Response.Status.CLIENT_NOT_CONNECTED);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     Status response;
 
     try {
@@ -995,11 +995,11 @@ public class MilvusGrpcClient implements MilvusClient {
           new Response(Response.Status.CLIENT_NOT_CONNECTED), null);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
-    TableInfo response;
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
+    io.milvus.grpc.CollectionInfo response;
 
     try {
-      response = blockingStub.showTableInfo(request);
+      response = blockingStub.showCollectionInfo(request);
 
       if (response.getStatus().getErrorCode() == ErrorCode.SUCCESS) {
 
@@ -1058,7 +1058,7 @@ public class MilvusGrpcClient implements MilvusClient {
     }
 
     VectorIdentity request =
-        VectorIdentity.newBuilder().setTableName(collectionName).setId(id).build();
+        VectorIdentity.newBuilder().setCollectionName(collectionName).setId(id).build();
     VectorData response;
 
     try {
@@ -1101,7 +1101,7 @@ public class MilvusGrpcClient implements MilvusClient {
 
     GetVectorIDsParam request =
         GetVectorIDsParam.newBuilder()
-            .setTableName(collectionName)
+            .setCollectionName(collectionName)
             .setSegmentName(segmentName)
             .build();
     VectorIds response;
@@ -1141,7 +1141,7 @@ public class MilvusGrpcClient implements MilvusClient {
     }
 
     DeleteByIDParam request =
-        DeleteByIDParam.newBuilder().setTableName(collectionName).addAllIdArray(ids).build();
+        DeleteByIDParam.newBuilder().setCollectionName(collectionName).addAllIdArray(ids).build();
     Status response;
 
     try {
@@ -1180,7 +1180,7 @@ public class MilvusGrpcClient implements MilvusClient {
       return new Response(Response.Status.CLIENT_NOT_CONNECTED);
     }
 
-    FlushParam request = FlushParam.newBuilder().addAllTableNameArray(collectionNames).build();
+    FlushParam request = FlushParam.newBuilder().addAllCollectionNameArray(collectionNames).build();
     Status response;
 
     try {
@@ -1208,7 +1208,7 @@ public class MilvusGrpcClient implements MilvusClient {
       return Futures.immediateFuture(new Response(Response.Status.CLIENT_NOT_CONNECTED));
     }
 
-    FlushParam request = FlushParam.newBuilder().addAllTableNameArray(collectionNames).build();
+    FlushParam request = FlushParam.newBuilder().addAllCollectionNameArray(collectionNames).build();
 
     ListenableFuture<Status> response;
 
@@ -1266,7 +1266,7 @@ public class MilvusGrpcClient implements MilvusClient {
       return new Response(Response.Status.CLIENT_NOT_CONNECTED);
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
     Status response;
 
     try {
@@ -1294,7 +1294,7 @@ public class MilvusGrpcClient implements MilvusClient {
       return Futures.immediateFuture(new Response(Response.Status.CLIENT_NOT_CONNECTED));
     }
 
-    TableName request = TableName.newBuilder().setTableName(collectionName).build();
+    CollectionName request = CollectionName.newBuilder().setCollectionName(collectionName).build();
 
     ListenableFuture<Status> response;
 

+ 74 - 65
src/main/proto/milvus.proto

@@ -17,27 +17,27 @@ message KeyValuePair {
 }
 
 /**
- * @brief Table name
+ * @brief Collection name
  */
-message TableName {
-    string table_name = 1;
+message CollectionName {
+    string collection_name = 1;
 }
 
 /**
- * @brief Table name list
+ * @brief Collection name list
  */
-message TableNameList {
+message CollectionNameList {
     Status status = 1;
-    repeated string table_names = 2;
+    repeated string collection_names = 2;
 }
 
 /**
- * @brief Table schema
+ * @brief Collection schema
  * metric_type: 1-L2, 2-IP
  */
-message TableSchema {
+message CollectionSchema {
     Status status = 1;
-    string table_name = 2;
+    string collection_name = 2;
     int64 dimension = 3;
     int64 index_file_size = 4;
     int32 metric_type = 5;
@@ -48,7 +48,7 @@ message TableSchema {
  * @brief Params of partition
  */
 message PartitionParam {
-    string table_name = 1;
+    string collection_name = 1;
     string tag = 2;
 }
 
@@ -72,7 +72,7 @@ message RowRecord {
  * @brief Params to be inserted
  */
 message InsertParam {
-    string table_name = 1;
+    string collection_name = 1;
     repeated RowRecord row_record_array = 2;
     repeated int64 row_id_array = 3;            //optional
     string partition_tag = 4;
@@ -91,7 +91,7 @@ message VectorIds {
  * @brief Params for searching vector
  */
 message SearchParam {
-    string table_name = 1;
+    string collection_name = 1;
     repeated string partition_tag_array = 2;
     repeated RowRecord query_record_array = 3;
     int64 topk = 4;
@@ -110,7 +110,7 @@ message SearchInFilesParam {
  * @brief Params for searching vector by ID
  */
 message SearchByIDParam {
-    string table_name = 1;
+    string collection_name = 1;
     repeated string partition_tag_array = 2;
     int64 id = 3;
     int64 topk = 4;
@@ -144,11 +144,11 @@ message BoolReply {
 }
 
 /**
- * @brief Return table row count
+ * @brief Return collection row count
  */
-message TableRowCount {
+message CollectionRowCount {
     Status status = 1;
-    int64 table_row_count = 2;
+    int64 collection_row_count = 2;
 }
 
 /**
@@ -164,7 +164,7 @@ message Command {
  */
 message IndexParam {
     Status status = 1;
-    string table_name = 2;
+    string collection_name = 2;
     int32 index_type = 3;
     repeated KeyValuePair extra_params = 4;
 }
@@ -173,14 +173,14 @@ message IndexParam {
  * @brief Flush params
  */
 message FlushParam {
-    repeated string table_name_array = 1;
+    repeated string collection_name_array = 1;
 }
 
 /**
  * @brief Flush params
  */
 message DeleteByIDParam {
-    string table_name = 1;
+    string collection_name = 1;
     repeated int64 id_array = 2;
 }
 
@@ -195,7 +195,7 @@ message SegmentStat {
 }
 
 /**
- * @brief table statistics
+ * @brief collection statistics
  */
 message PartitionStat {
     string tag = 1;
@@ -204,9 +204,9 @@ message PartitionStat {
 }
 
 /**
- * @brief table information
+ * @brief collection information
  */
-message TableInfo {
+message CollectionInfo {
     Status status = 1;
     int64 total_row_count = 2;
     repeated PartitionStat partitions_stat = 3;
@@ -216,7 +216,7 @@ message TableInfo {
  * @brief vector identity
  */
 message VectorIdentity {
-    string table_name = 1;
+    string collection_name = 1;
     int64 id = 2;
 }
 
@@ -232,76 +232,76 @@ message VectorData {
  * @brief get vector ids from a segment parameters
  */
 message GetVectorIDsParam {
-    string table_name = 1;
+    string collection_name = 1;
     string segment_name = 2;
 }
 
 service MilvusService {
     /**
-     * @brief This method is used to create table
+     * @brief This method is used to create collection
      *
-     * @param TableSchema, use to provide table information to be created.
+     * @param CollectionSchema, use to provide collection information to be created.
      *
      * @return Status
      */
-    rpc CreateTable(TableSchema) returns (Status){}
+    rpc CreateCollection(CollectionSchema) returns (Status){}
 
     /**
-     * @brief This method is used to test table existence.
+     * @brief This method is used to test collection existence.
      *
-     * @param TableName, table name is going to be tested.
+     * @param CollectionName, collection name is going to be tested.
      *
      * @return BoolReply
      */
-    rpc HasTable(TableName) returns (BoolReply) {}
+    rpc HasCollection(CollectionName) returns (BoolReply) {}
 
     /**
-     * @brief This method is used to get table schema.
+     * @brief This method is used to get collection schema.
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
-     * @return TableSchema
+     * @return CollectionSchema
      */
-    rpc DescribeTable(TableName) returns (TableSchema) {}
+    rpc DescribeCollection(CollectionName) returns (CollectionSchema) {}
 
     /**
-     * @brief This method is used to get table schema.
+     * @brief This method is used to get collection schema.
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
-     * @return TableRowCount
+     * @return CollectionRowCount
      */
-    rpc CountTable(TableName) returns (TableRowCount) {}
+    rpc CountCollection(CollectionName) returns (CollectionRowCount) {}
 
     /**
-     * @brief This method is used to list all tables.
+     * @brief This method is used to list all collections.
      *
      * @param Command, dummy parameter.
      *
-     * @return TableNameList
+     * @return CollectionNameList
      */
-    rpc ShowTables(Command) returns (TableNameList) {}
+    rpc ShowCollections(Command) returns (CollectionNameList) {}
 
     /**
-     * @brief This method is used to get table detail information.
+     * @brief This method is used to get collection detail information.
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
-     * @return TableInfo
+     * @return CollectionInfo
      */
-    rpc ShowTableInfo(TableName) returns (TableInfo) {}
+    rpc ShowCollectionInfo(CollectionName) returns (CollectionInfo) {}
 
     /**
-     * @brief This method is used to delete table.
+     * @brief This method is used to delete collection.
      *
-     * @param TableName, table name is going to be deleted.
+     * @param CollectionName, collection name is going to be deleted.
      *
-     * @return TableNameList
+     * @return CollectionNameList
      */
-    rpc DropTable(TableName) returns (Status) {}
+    rpc DropCollection(CollectionName) returns (Status) {}
 
     /**
-     * @brief This method is used to build index by table in sync mode.
+     * @brief This method is used to build index by collection in sync mode.
      *
      * @param IndexParam, index paramters.
      *
@@ -312,20 +312,20 @@ service MilvusService {
     /**
      * @brief This method is used to describe index
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
      * @return IndexParam
      */
-    rpc DescribeIndex(TableName) returns (IndexParam) {}
+    rpc DescribeIndex(CollectionName) returns (IndexParam) {}
 
     /**
      * @brief This method is used to drop index
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
      * @return Status
      */
-    rpc DropIndex(TableName) returns (Status) {}
+    rpc DropIndex(CollectionName) returns (Status) {}
 
     /**
      * @brief This method is used to create partition
@@ -339,11 +339,11 @@ service MilvusService {
     /**
      * @brief This method is used to show partition information
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
      * @return PartitionList
      */
-    rpc ShowPartitions(TableName) returns (PartitionList) {}
+    rpc ShowPartitions(CollectionName) returns (PartitionList) {}
 
     /**
      * @brief This method is used to drop partition
@@ -355,7 +355,7 @@ service MilvusService {
     rpc DropPartition(PartitionParam) returns (Status) {}
 
     /**
-     * @brief This method is used to add vector array to table.
+     * @brief This method is used to add vector array to collection.
      *
      * @param InsertParam, insert parameters.
      *
@@ -375,14 +375,14 @@ service MilvusService {
     /**
      * @brief This method is used to get vector ids from a segment
      *
-     * @param GetVectorIDsParam, target table and segment
+     * @param GetVectorIDsParam, target collection and segment
      *
      * @return VectorIds
      */
     rpc GetVectorIDs(GetVectorIDsParam) returns (VectorIds) {}
 
     /**
-     * @brief This method is used to query vector in table.
+     * @brief This method is used to query vector in collection.
      *
      * @param SearchParam, search parameters.
      *
@@ -390,6 +390,15 @@ service MilvusService {
      */
     rpc Search(SearchParam) returns (TopKQueryResult) {}
 
+    /**
+     * @brief This method is used to query vector by id.
+     *
+     * @param SearchByIDParam, search parameters.
+     *
+     * @return TopKQueryResult
+     */
+    rpc SearchByID(SearchByIDParam) returns (TopKQueryResult) {}
+
     /**
      * @brief This method is used to query vector in specified files.
      *
@@ -418,13 +427,13 @@ service MilvusService {
     rpc DeleteByID(DeleteByIDParam) returns (Status) {}
 
     /**
-     * @brief This method is used to preload table
+     * @brief This method is used to preload collection
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
      * @return Status
      */
-    rpc PreloadTable(TableName) returns (Status) {}
+    rpc PreloadCollection(CollectionName) returns (Status) {}
 
     /**
      * @brief This method is used to flush buffer into storage.
@@ -436,11 +445,11 @@ service MilvusService {
     rpc Flush(FlushParam) returns (Status) {}
 
     /**
-     * @brief This method is used to compact table
+     * @brief This method is used to compact collection
      *
-     * @param TableName, target table name.
+     * @param CollectionName, target collection name.
      *
      * @return Status
      */
-    rpc Compact(TableName) returns (Status) {}
+    rpc Compact(CollectionName) returns (Status) {}
 }

+ 2 - 2
src/main/proto/status.proto

@@ -11,11 +11,11 @@ enum ErrorCode {
     UNEXPECTED_ERROR = 1;
     CONNECT_FAILED = 2;
     PERMISSION_DENIED = 3;
-    TABLE_NOT_EXISTS = 4;
+    COLLECTION_NOT_EXISTS = 4;
     ILLEGAL_ARGUMENT = 5;
     ILLEGAL_DIMENSION = 7;
     ILLEGAL_INDEX_TYPE = 8;
-    ILLEGAL_TABLE_NAME = 9;
+    ILLEGAL_COLLECTION_NAME = 9;
     ILLEGAL_TOPK = 10;
     ILLEGAL_ROWRECORD = 11;
     ILLEGAL_VECTOR_ID = 12;