milvus.proto 8.3 KB
Newer Older
1 2 3 4 5 6
syntax = "proto3";
package milvus.proto.milvus;

option go_package = "github.com/zilliztech/milvus-distributed/internal/proto/milvuspb";

import "common.proto";
Y
yukun 已提交
7
import "schema.proto";
8 9

message CreateCollectionRequest {
10
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
11
  string db_name = 2;
12
  string collection_name = 3;
Y
yukun 已提交
13
  // `schema` is the serialized `schema.CollectionSchema`
Z
zhenshan.cao 已提交
14
  bytes schema = 4;
15 16 17 18
}


message DropCollectionRequest {
19
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
20
  string db_name = 2;
21
  string collection_name = 3;
22 23 24
}

message HasCollectionRequest {
25
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
26
  string db_name = 2;
27 28 29
  string collection_name = 3;
}

Y
yukun 已提交
30 31 32 33 34
message BoolResponse {
  common.Status status = 1;
  bool value = 2;
}

Z
zhenshan.cao 已提交
35 36 37 38 39
message StringResponse {
  common.Status status = 1;
  string value = 2;
}

40
message DescribeCollectionRequest {
41
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
42
  string db_name = 2;
43
  string collection_name = 3;
N
neza2017 已提交
44
  int64 collectionID = 4;
45 46 47
}

message DescribeCollectionResponse {
Y
yukun 已提交
48 49
  common.Status status = 1;
  schema.CollectionSchema schema = 2;
50
  int64 collectionID = 3;
51 52 53
}

message LoadCollectionRequest {
54
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
55
  string db_name = 2;
56 57 58 59
  string collection_name = 3;
}

message ReleaseCollectionRequest {
60
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
61
  string db_name = 2;
62 63 64 65
  string collection_name = 3;
}

message CollectionStatsRequest {
66
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
67
  string db_name = 2;
68 69 70 71
  string collection_name = 3;
}

message CollectionStatsResponse {
Z
zhenshan.cao 已提交
72 73
  common.Status status = 1;
  repeated common.KeyValuePair stats = 2;
74 75 76 77
}


message ShowCollectionRequest {
78
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
79
  string db_name = 2;
80 81 82
}

message ShowCollectionResponse {
Z
zhenshan.cao 已提交
83 84
  common.Status status = 1;
  repeated string collection_names = 2;
85 86 87 88
}


message CreatePartitionRequest {
89
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
90
  string db_name = 2;
91 92 93 94 95 96
  string collection_name = 3;
  string partition_name = 4;
}


message DropPartitionRequest {
97
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
98
  string db_name = 2;
99 100 101 102 103
  string collection_name = 3;
  string partition_name = 4;
}

message HasPartitionRequest {
104
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
105
  string db_name = 2;
106 107 108 109 110
  string collection_name = 3;
  string partition_name = 4;
}

message LoadPartitonRequest {
111
  common.MsgBase base = 1;
112 113 114 115 116 117
  string db_name = 2;
  string collection_name = 3;
  repeated string partition_names = 4;
}

message ReleasePartitionRequest {
118
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
119
  string db_name = 2;
120 121 122 123 124
  string collection_name = 3;
  repeated  string partition_names = 4;
}

message PartitionStatsRequest  {
125
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
126
  string db_name = 2;
127 128 129 130 131
  string collection_name = 3;
  string partition_name = 4;
}

message PartitionStatsResponse {
Z
zhenshan.cao 已提交
132 133
  common.Status status = 1;
  repeated common.KeyValuePair stats = 2;
134 135 136
}

message ShowPartitionRequest {
137
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
138
  string db_name = 2;
139
  string collection_name = 3;
140
  int64 collectionID = 4;
141 142 143
}

message ShowPartitionResponse {
Z
zhenshan.cao 已提交
144 145 146
  common.Status status = 1;
  repeated string partition_names = 2;
  repeated int64 partitionIDs = 3;
147 148 149 150 151 152 153 154 155 156 157
}

message DescribeSegmentRequest {
  common.MsgBase base = 1;
  int64 collectionID = 2;
  int64 segmentID = 3;
}

message DescribeSegmentResponse {
  common.Status status = 1;
  int64 indexID = 2;
N
neza2017 已提交
158
  int64 buildID = 3;
159 160
}

161 162 163 164 165 166 167 168 169 170
message ShowSegmentRequest {
  common.MsgBase base = 1;
  int64 collectionID = 2;
  int64 partitionID = 3;
}

message ShowSegmentResponse {
  common.Status status = 1;
  repeated int64 segmentIDs = 2;
}
171 172

message CreateIndexRequest {
173
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
174
  string db_name = 2;
175 176 177 178 179 180
  string collection_name = 3;
  string field_name = 4;
  repeated common.KeyValuePair extra_params = 5;
}

message DescribeIndexRequest {
181
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
182
  string db_name = 2;
183 184
  string collection_name = 3;
  string field_name = 4;
185
  string index_name = 5;
186 187 188 189
}

message IndexDescription {
  string index_name = 1;
190 191
  int64  indexID = 2;
  repeated common.KeyValuePair params = 3;
192 193 194
}

message DescribeIndexResponse {
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
  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;
210 211
}

X
xige-16 已提交
212 213 214 215 216 217 218 219
message DropIndexRequest {
  common.MsgBase base = 1;
  string db_name = 2;
  string collection_name = 3;
  string field_name = 4;
  string index_name = 5;
}

220
message InsertRequest {
221
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
222
  string db_name = 2;
223 224 225 226 227 228 229
  string collection_name = 3;
  string partition_name = 4;
  repeated common.Blob row_data = 5;
  repeated uint32  hash_keys = 6;
}

message InsertResponse {
Z
zhenshan.cao 已提交
230 231 232
  common.Status status = 1;
  int64  rowID_begin = 2;
  int64  rowID_end = 3;
Y
yukun 已提交
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
}

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;
250 251 252
}

message SearchRequest {
253
  common.MsgBase base = 1;
Z
zhenshan.cao 已提交
254
  string db_name = 2;
255 256 257
  string collection_name = 3;
  repeated  string partition_names = 4;
  string dsl = 5;
Y
yukun 已提交
258 259 260 261 262 263 264 265 266 267
  // serialized `PlaceholderGroup`
  bytes placeholder_group = 6;
}

message Hits {
  repeated int64 IDs = 1;
  repeated bytes row_data = 2;
  repeated float scores = 3;
}

268
message SearchResults {
Y
yukun 已提交
269 270
  common.Status status = 1;
  repeated bytes hits = 2;
271 272 273
}

message FlushRequest {
274
  common.MsgBase base = 1;
275
  string db_name = 2;
276
  repeated string collection_names = 3;
Y
yukun 已提交
277 278
}

Z
zhenshan.cao 已提交
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302

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;
}

Z
zhenshan.cao 已提交
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323
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;
}

Y
yukun 已提交
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
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) {}
344
  rpc GetIndexState(IndexStateRequest) returns (IndexStateResponse) {}
X
xige-16 已提交
345
  rpc DropIndex(DropIndexRequest) returns (common.Status) {}
Y
yukun 已提交
346 347

  rpc Insert(InsertRequest) returns (InsertResponse) {}
348
  rpc Search(SearchRequest) returns (SearchResults) {}
Y
yukun 已提交
349
  rpc Flush(FlushRequest) returns (common.Status) {}
Z
zhenshan.cao 已提交
350 351

  rpc GetDdChannel(common.Empty) returns (StringResponse) {}
Z
zhenshan.cao 已提交
352 353

  rpc GetPersistentSegmentInfo(PersistentSegmentInfoRequest) returns (PersistentSegmentInfoResponse) {}
Z
zhenshan.cao 已提交
354
  rpc GetQuerySegmentInfo(QuerySegmentInfoRequest) returns (QuerySegmentInfoResponse) {}
Z
zhenshan.cao 已提交
355

356
  rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
Y
yukun 已提交
357
}
D
dragondriver 已提交
358 359 360 361 362 363 364 365 366

message RegisterLinkResponse {
  common.Address address = 1;
  common.Status status = 2;
}

service ProxyService {
  rpc RegisterLink(common.Empty) returns (RegisterLinkResponse) {}
}