2021-01-14 14:24:14 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
package milvus.proto.milvus;
|
|
|
|
|
|
|
|
option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb";
|
|
|
|
|
|
|
|
import "common.proto";
|
2021-01-15 20:12:26 +08:00
|
|
|
import "schema.proto";
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
message CreateCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-22 09:36:18 +08:00
|
|
|
string collection_name = 3;
|
2021-01-15 20:12:26 +08:00
|
|
|
// `schema` is the serialized `schema.CollectionSchema`
|
2021-01-14 20:30:27 +08:00
|
|
|
bytes schema = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message DropCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-22 09:36:18 +08:00
|
|
|
string collection_name = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message HasCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
}
|
|
|
|
|
2021-01-15 20:12:26 +08:00
|
|
|
message BoolResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
bool value = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-18 21:39:56 +08:00
|
|
|
message StringResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-14 14:24:14 +08:00
|
|
|
message DescribeCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
2021-02-25 16:08:56 +08:00
|
|
|
int64 collectionID = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeCollectionResponse {
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
schema.CollectionSchema schema = 2;
|
2021-01-22 15:41:54 +08:00
|
|
|
int64 collectionID = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message LoadCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReleaseCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CollectionStatsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CollectionStatsResponse {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated common.KeyValuePair stats = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ShowCollectionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ShowCollectionResponse {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated string collection_names = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message CreatePartitionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message DropPartitionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message HasPartitionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LoadPartitonRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
repeated string partition_names = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReleasePartitionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
repeated string partition_names = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PartitionStatsRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PartitionStatsResponse {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated common.KeyValuePair stats = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ShowPartitionRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
2021-01-18 19:32:08 +08:00
|
|
|
int64 collectionID = 4;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ShowPartitionResponse {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated string partition_names = 2;
|
|
|
|
repeated int64 partitionIDs = 3;
|
2021-01-18 19:32:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeSegmentRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 segmentID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeSegmentResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
int64 indexID = 2;
|
2021-01-28 17:25:43 +08:00
|
|
|
int64 buildID = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
message ShowSegmentRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ShowSegmentResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated int64 segmentIDs = 2;
|
|
|
|
}
|
2021-01-14 14:24:14 +08:00
|
|
|
|
|
|
|
message CreateIndexRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string field_name = 4;
|
|
|
|
repeated common.KeyValuePair extra_params = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeIndexRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string field_name = 4;
|
2021-01-18 19:32:08 +08:00
|
|
|
string index_name = 5;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message IndexDescription {
|
|
|
|
string index_name = 1;
|
2021-02-08 14:20:29 +08:00
|
|
|
int64 indexID = 2;
|
|
|
|
repeated common.KeyValuePair params = 3;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeIndexResponse {
|
2021-01-18 19:32:08 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated IndexDescription index_descriptions = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IndexStateRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string db_name = 2 ;
|
|
|
|
string collection_name = 3;
|
|
|
|
string field_name = 4;
|
|
|
|
string index_name = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IndexStateResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
common.IndexState state = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
2021-02-20 10:14:03 +08:00
|
|
|
message DropIndexRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string db_name = 2;
|
|
|
|
string collection_name = 3;
|
|
|
|
string field_name = 4;
|
|
|
|
string index_name = 5;
|
|
|
|
}
|
|
|
|
|
2021-01-14 14:24:14 +08:00
|
|
|
message InsertRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
string partition_name = 4;
|
|
|
|
repeated common.Blob row_data = 5;
|
|
|
|
repeated uint32 hash_keys = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
message InsertResponse {
|
2021-01-18 21:39:56 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
int64 rowID_begin = 2;
|
|
|
|
int64 rowID_end = 3;
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
enum PlaceholderType {
|
|
|
|
NONE = 0;
|
|
|
|
VECTOR_BINARY = 100;
|
|
|
|
VECTOR_FLOAT = 101;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PlaceholderValue {
|
|
|
|
string tag = 1;
|
|
|
|
PlaceholderType type = 2;
|
|
|
|
// values is a 2d-array, every array contains a vector
|
|
|
|
repeated bytes values = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PlaceholderGroup {
|
|
|
|
repeated PlaceholderValue placeholders = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message SearchRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 20:30:27 +08:00
|
|
|
string db_name = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
string collection_name = 3;
|
|
|
|
repeated string partition_names = 4;
|
|
|
|
string dsl = 5;
|
2021-01-15 20:12:26 +08:00
|
|
|
// serialized `PlaceholderGroup`
|
|
|
|
bytes placeholder_group = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Hits {
|
|
|
|
repeated int64 IDs = 1;
|
|
|
|
repeated bytes row_data = 2;
|
|
|
|
repeated float scores = 3;
|
|
|
|
}
|
|
|
|
|
2021-01-18 19:32:08 +08:00
|
|
|
message SearchResults {
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
repeated bytes hits = 2;
|
2021-01-14 14:24:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message FlushRequest {
|
2021-01-16 15:06:19 +08:00
|
|
|
common.MsgBase base = 1;
|
2021-01-14 14:24:14 +08:00
|
|
|
string db_name = 2;
|
2021-02-03 17:30:10 +08:00
|
|
|
repeated string collection_names = 3;
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
|
|
|
|
2021-02-03 18:55:00 +08:00
|
|
|
|
|
|
|
message PersistentSegmentInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
uint64 open_time = 4;
|
|
|
|
uint64 sealed_time = 5;
|
|
|
|
uint64 flushed_time = 6;
|
|
|
|
int64 num_rows = 7;
|
|
|
|
int64 mem_size = 8;
|
|
|
|
common.SegmentState state = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PersistentSegmentInfoRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string dbName = 2;
|
|
|
|
string collectionName = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PersistentSegmentInfoResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated PersistentSegmentInfo infos = 2;
|
|
|
|
}
|
|
|
|
|
2021-02-04 14:37:12 +08:00
|
|
|
message QuerySegmentInfo {
|
|
|
|
int64 segmentID = 1;
|
|
|
|
int64 collectionID = 2;
|
|
|
|
int64 partitionID = 3;
|
|
|
|
int64 mem_size = 4;
|
|
|
|
int64 num_rows = 5;
|
|
|
|
string index_name = 6;
|
|
|
|
int64 indexID = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QuerySegmentInfoRequest {
|
|
|
|
common.MsgBase base = 1;
|
|
|
|
string dbName = 2;
|
|
|
|
string collectionName = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QuerySegmentInfoResponse {
|
|
|
|
common.Status status = 1;
|
|
|
|
repeated QuerySegmentInfo infos = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-15 20:12:26 +08:00
|
|
|
service MilvusService {
|
|
|
|
rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc DropCollection(DropCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc HasCollection(HasCollectionRequest) returns (BoolResponse) {}
|
|
|
|
rpc LoadCollection(LoadCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc ReleaseCollection(ReleaseCollectionRequest) returns (common.Status) {}
|
|
|
|
rpc DescribeCollection(DescribeCollectionRequest) returns (DescribeCollectionResponse) {}
|
|
|
|
rpc GetCollectionStatistics(CollectionStatsRequest) returns (CollectionStatsResponse) {}
|
|
|
|
rpc ShowCollections(ShowCollectionRequest) returns (ShowCollectionResponse) {}
|
|
|
|
|
|
|
|
rpc CreatePartition(CreatePartitionRequest) returns (common.Status) {}
|
|
|
|
rpc DropPartition(DropPartitionRequest) returns (common.Status) {}
|
|
|
|
rpc HasPartition(HasPartitionRequest) returns (BoolResponse) {}
|
|
|
|
rpc LoadPartitions(LoadPartitonRequest) returns (common.Status) {}
|
|
|
|
rpc ReleasePartitions(ReleasePartitionRequest) returns (common.Status) {}
|
|
|
|
rpc GetPartitionStatistics(PartitionStatsRequest) returns (PartitionStatsResponse) {}
|
|
|
|
rpc ShowPartitions(ShowPartitionRequest) returns (ShowPartitionResponse) {}
|
|
|
|
|
|
|
|
rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
|
|
|
|
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
|
2021-01-18 19:32:08 +08:00
|
|
|
rpc GetIndexState(IndexStateRequest) returns (IndexStateResponse) {}
|
2021-02-20 10:14:03 +08:00
|
|
|
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
|
2021-01-15 20:12:26 +08:00
|
|
|
|
|
|
|
rpc Insert(InsertRequest) returns (InsertResponse) {}
|
2021-01-18 19:32:08 +08:00
|
|
|
rpc Search(SearchRequest) returns (SearchResults) {}
|
2021-01-15 20:12:26 +08:00
|
|
|
rpc Flush(FlushRequest) returns (common.Status) {}
|
2021-01-18 21:39:56 +08:00
|
|
|
|
|
|
|
rpc GetDdChannel(common.Empty) returns (StringResponse) {}
|
2021-02-03 18:55:00 +08:00
|
|
|
|
|
|
|
rpc GetPersistentSegmentInfo(PersistentSegmentInfoRequest) returns (PersistentSegmentInfoResponse) {}
|
2021-02-04 14:37:12 +08:00
|
|
|
rpc GetQuerySegmentInfo(QuerySegmentInfoRequest) returns (QuerySegmentInfoResponse) {}
|
2021-02-03 18:55:00 +08:00
|
|
|
|
2021-01-15 20:12:26 +08:00
|
|
|
}
|
2021-01-22 12:57:23 +08:00
|
|
|
|
|
|
|
message RegisterLinkResponse {
|
|
|
|
common.Address address = 1;
|
|
|
|
common.Status status = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
service ProxyService {
|
|
|
|
rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
|
|
|
|
}
|