From 5ac8b8acc61c61a9ac29dbbf810c62638e988b3c Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Thu, 27 May 2021 16:34:31 +0800 Subject: [PATCH] Add comments to proto (#5452) Specify which fields must be set by SDK Signed-off-by: zhenshan.cao --- internal/proto/milvus.proto | 148 ++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/internal/proto/milvus.proto b/internal/proto/milvus.proto index 7830e24255..ab9533e3f3 100644 --- a/internal/proto/milvus.proto +++ b/internal/proto/milvus.proto @@ -45,24 +45,24 @@ service MilvusService { } message CreateCollectionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must // `schema` is the serialized `schema.CollectionSchema` - bytes schema = 4; - int32 shards_num = 5; + bytes schema = 4; // must + int32 shards_num = 5; // must. Once set, no modification is allowed } message DropCollectionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must } message HasCollectionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must uint64 time_stamp = 4; } @@ -77,9 +77,9 @@ message StringResponse { } message DescribeCollectionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must int64 collectionID = 4; uint64 time_stamp = 5; } @@ -93,21 +93,21 @@ message DescribeCollectionResponse { } message LoadCollectionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must } message ReleaseCollectionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must } message GetCollectionStatisticsRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must } message GetCollectionStatisticsResponse { @@ -116,7 +116,7 @@ message GetCollectionStatisticsResponse { } message ShowCollectionsRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; uint64 time_stamp = 3; } @@ -127,45 +127,45 @@ message ShowCollectionsResponse { } message CreatePartitionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - string partition_name = 4; + string collection_name = 3; // must + string partition_name = 4; // must } message DropPartitionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - string partition_name = 4; + string collection_name = 3; // must + string partition_name = 4; // must } message HasPartitionRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - string partition_name = 4; + string collection_name = 3; // must + string partition_name = 4; // must } message LoadPartitionsRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - repeated string partition_names = 4; + string collection_name = 3; // must + repeated string partition_names = 4; // must } message ReleasePartitionsRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - repeated string partition_names = 4; + string collection_name = 3; // must + repeated string partition_names = 4; // must } message GetPartitionStatisticsRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - string partition_name = 4; + string collection_name = 3; // must + string partition_name = 4; // must } message GetPartitionStatisticsResponse { @@ -174,9 +174,9 @@ message GetPartitionStatisticsResponse { } message ShowPartitionsRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must int64 collectionID = 4; } @@ -211,19 +211,19 @@ message ShowSegmentsResponse { } message CreateIndexRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - string field_name = 4; - repeated common.KeyValuePair extra_params = 5; + string collection_name = 3; // must + string field_name = 4; // must + repeated common.KeyValuePair extra_params = 5; // must } message DescribeIndexRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must string field_name = 4; - string index_name = 5; + string index_name = 5; // No need to set up for now @2021.06.30 } message IndexDescription { @@ -239,11 +239,11 @@ message DescribeIndexResponse { } message GetIndexBuildProgressRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2 ; - string collection_name = 3; + string collection_name = 3; // must string field_name = 4; - string index_name = 5; + string index_name = 5; // must } message GetIndexBuildProgressResponse { @@ -253,11 +253,11 @@ message GetIndexBuildProgressResponse { } message GetIndexStateRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2 ; - string collection_name = 3; + string collection_name = 3; // must string field_name = 4; - string index_name = 5; + string index_name = 5; // No need to set up for now @2021.06.30 } message GetIndexStateResponse { @@ -266,20 +266,20 @@ message GetIndexStateResponse { } message DropIndexRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; + string collection_name = 3; // must string field_name = 4; - string index_name = 5; + string index_name = 5; // No need to set up for now @2021.06.30 } message InsertRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - string partition_name = 4; - repeated common.Blob row_data = 5; - repeated uint32 hash_keys = 6; + string collection_name = 3; // must + string partition_name = 4; // must + repeated common.Blob row_data = 5; // must + repeated uint32 hash_keys = 6; // must } message InsertResponse { @@ -306,24 +306,24 @@ message PlaceholderGroup { } message SearchRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - repeated string partition_names = 4; - string dsl = 5; + string collection_name = 3; // must + repeated string partition_names = 4; // must + string dsl = 5; // must // serialized `PlaceholderGroup` - bytes placeholder_group = 6; - common.DslType dsl_type = 7; - repeated common.KeyValuePair search_params = 8; + bytes placeholder_group = 6; // must + common.DslType dsl_type = 7; // must + repeated common.KeyValuePair search_params = 8; // must } message RetrieveRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string db_name = 2; - string collection_name = 3; - repeated string partition_names = 4; - schema.IDs ids = 5; - repeated string output_fields = 6; + string collection_name = 3; // must + repeated string partition_names = 4; // must + schema.IDs ids = 5; // must + repeated string output_fields = 6; // must } message RetrieveResults { @@ -358,9 +358,9 @@ message PersistentSegmentInfo { } message GetPersistentSegmentInfoRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string dbName = 2; - string collectionName = 3; + string collectionName = 3; // must } message GetPersistentSegmentInfoResponse { @@ -379,9 +379,9 @@ message QuerySegmentInfo { } message GetQuerySegmentInfoRequest { - common.MsgBase base = 1; + common.MsgBase base = 1; // must string dbName = 2; - string collectionName = 3; + string collectionName = 3; // must } message GetQuerySegmentInfoResponse {