[skip ci] Add IndexDescription comments in milvus.proto (#10246)

Signed-off-by: Gitea <zizhao.chen@zilliz.com>
pull/10602/head
nameczz 2021-10-25 19:58:18 +08:00 committed by GitHub
parent d7c3bc1373
commit 80f1eb8356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 8 deletions

View File

@ -444,15 +444,27 @@ message DescribeIndexRequest {
string index_name = 5; string index_name = 5;
} }
/*
* Index informations
*/
message IndexDescription { message IndexDescription {
// Index name
string index_name = 1; string index_name = 1;
// Index id
int64 indexID = 2; int64 indexID = 2;
// Will return index_type, metric_type, params(like nlist).
repeated common.KeyValuePair params = 3; repeated common.KeyValuePair params = 3;
// The vector field name
string field_name = 4; string field_name = 4;
} }
/*
* Describe index response
*/
message DescribeIndexResponse { message DescribeIndexResponse {
// Response status
common.Status status = 1; common.Status status = 1;
// All index informations, for now only return tha latest index you created for the collection.
repeated IndexDescription index_descriptions = 2; repeated IndexDescription index_descriptions = 2;
} }

View File

@ -2178,10 +2178,16 @@ func (m *DescribeIndexRequest) GetIndexName() string {
return "" return ""
} }
//
// Index informations
type IndexDescription struct { type IndexDescription struct {
// Index name
IndexName string `protobuf:"bytes,1,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"` IndexName string `protobuf:"bytes,1,opt,name=index_name,json=indexName,proto3" json:"index_name,omitempty"`
// Index id
IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"` IndexID int64 `protobuf:"varint,2,opt,name=indexID,proto3" json:"indexID,omitempty"`
// Will return index_type, metric_type, params(like nlist).
Params []*commonpb.KeyValuePair `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty"` Params []*commonpb.KeyValuePair `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty"`
// The vector field name
FieldName string `protobuf:"bytes,4,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` FieldName string `protobuf:"bytes,4,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
@ -2241,8 +2247,12 @@ func (m *IndexDescription) GetFieldName() string {
return "" return ""
} }
//
// Describe index response
type DescribeIndexResponse struct { type DescribeIndexResponse struct {
// Response status
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// All index informations, for now only return tha latest index you created for the collection.
IndexDescriptions []*IndexDescription `protobuf:"bytes,2,rep,name=index_descriptions,json=indexDescriptions,proto3" json:"index_descriptions,omitempty"` IndexDescriptions []*IndexDescription `protobuf:"bytes,2,rep,name=index_descriptions,json=indexDescriptions,proto3" json:"index_descriptions,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`