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-14 14:24:14 +08:00
|
|
|
string collectionName = 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-14 14:24:14 +08:00
|
|
|
string collectionName = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
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-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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeCollectionResponse {
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 1;
|
|
|
|
schema.CollectionSchema schema = 2;
|
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 {
|
|
|
|
repeated common.KeyValuePair stats = 1;
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 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 {
|
|
|
|
repeated string collection_names = 1;
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 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 {
|
|
|
|
repeated common.KeyValuePair stats = 1;
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ShowPartitionResponse {
|
|
|
|
repeated string partition_names = 1;
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IndexDescription {
|
|
|
|
string index_name = 1;
|
|
|
|
repeated common.KeyValuePair params = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DescribeIndexResponse {
|
|
|
|
repeated IndexDescription index_descriptions = 1;
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 2;
|
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 {
|
|
|
|
int64 rowID_begin = 1;
|
|
|
|
int64 rowID_end = 2;
|
2021-01-15 20:12:26 +08:00
|
|
|
common.Status status = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message QueryResult {
|
|
|
|
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;
|
|
|
|
string collection_name = 3;
|
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) {}
|
|
|
|
|
|
|
|
rpc Insert(InsertRequest) returns (InsertResponse) {}
|
|
|
|
rpc Search(SearchRequest) returns (QueryResult) {}
|
|
|
|
rpc Flush(FlushRequest) returns (common.Status) {}
|
|
|
|
}
|