@zilliz/milvus2-sdk-node 1.0.16 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/grpc-proto/common.proto +34 -0
- package/dist/grpc-proto/milvus.proto +357 -61
- package/dist/milvus/Client.d.ts +2 -0
- package/dist/milvus/Client.js +11 -0
- package/dist/milvus/Client.js.map +1 -1
- package/dist/milvus/Collection.d.ts +114 -4
- package/dist/milvus/Collection.js +267 -19
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.d.ts +150 -7
- package/dist/milvus/Data.js +341 -17
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/MilvusIndex.js +15 -3
- package/dist/milvus/MilvusIndex.js.map +1 -1
- package/dist/milvus/Partition.js +28 -7
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/Utils.d.ts +1 -0
- package/dist/milvus/Utils.js +8 -0
- package/dist/milvus/Utils.js.map +1 -0
- package/dist/milvus/const/ErrorReason.d.ts +18 -3
- package/dist/milvus/const/ErrorReason.js +17 -2
- package/dist/milvus/const/ErrorReason.js.map +1 -1
- package/dist/milvus/index.js +4 -0
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +27 -10
- package/dist/milvus/types/Common.d.ts +13 -0
- package/dist/milvus/types/Common.js +16 -1
- package/dist/milvus/types/Common.js.map +1 -1
- package/dist/milvus/types/Data.d.ts +42 -0
- package/dist/milvus/types/{Insert.js → Data.js} +1 -1
- package/dist/milvus/types/Data.js.map +1 -0
- package/dist/milvus/types/Response.d.ts +52 -7
- package/dist/milvus/types/Response.js +1 -1
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/Search.d.ts +7 -0
- package/dist/milvus/types.d.ts +4 -4
- package/dist/milvus/utils/Format.d.ts +76 -0
- package/dist/milvus/utils/Format.js +126 -3
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/milvus/utils/Validate.js +9 -1
- package/dist/milvus/utils/Validate.js.map +1 -1
- package/dist/sdk.json +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +4 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/milvus/types/Insert.d.ts +0 -18
- package/dist/milvus/types/Insert.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[](https://badges.aleen42.com/src/typescript.svg)
|
|
2
2
|
[](https://img.shields.io/npm/v/@zilliz/milvus2-sdk-node)
|
|
3
3
|
[](https://img.shields.io/npm/dw/@zilliz/milvus2-sdk-node)
|
|
4
|
-
[](https://codecov.io/gh/milvus-io/milvus-sdk-node)
|
|
5
5
|
|
|
6
6
|
# Milvus2-sdk-node
|
|
7
7
|
|
|
@@ -51,6 +51,7 @@ enum SegmentState {
|
|
|
51
51
|
Sealed = 3;
|
|
52
52
|
Flushed = 4;
|
|
53
53
|
Flushing = 5;
|
|
54
|
+
Dropped = 6;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
message Status {
|
|
@@ -63,6 +64,11 @@ message KeyValuePair {
|
|
|
63
64
|
string value = 2;
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
message KeyDataPair {
|
|
68
|
+
string key = 1;
|
|
69
|
+
bytes data = 2;
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
message Blob {
|
|
67
73
|
bytes value = 1;
|
|
68
74
|
}
|
|
@@ -83,6 +89,10 @@ enum MsgType {
|
|
|
83
89
|
GetSystemConfigs = 105;
|
|
84
90
|
LoadCollection = 106;
|
|
85
91
|
ReleaseCollection = 107;
|
|
92
|
+
CreateAlias = 108;
|
|
93
|
+
DropAlias = 109;
|
|
94
|
+
AlterAlias = 110;
|
|
95
|
+
|
|
86
96
|
|
|
87
97
|
/* DEFINITION REQUESTS: PARTITION */
|
|
88
98
|
CreatePartition = 200;
|
|
@@ -124,9 +134,13 @@ enum MsgType {
|
|
|
124
134
|
RemoveDmChannels = 509;
|
|
125
135
|
WatchQueryChannels = 510;
|
|
126
136
|
RemoveQueryChannels = 511;
|
|
137
|
+
SealedSegmentsChangeInfo = 512;
|
|
138
|
+
WatchDeltaChannels = 513;
|
|
127
139
|
|
|
128
140
|
/* DATA SERVICE */
|
|
129
141
|
SegmentInfo = 600;
|
|
142
|
+
SystemInfo = 601;
|
|
143
|
+
GetRecoveryInfo = 602;
|
|
130
144
|
|
|
131
145
|
/* SYSTEM CONTROL */
|
|
132
146
|
TimeTick = 1200;
|
|
@@ -157,3 +171,23 @@ enum DslType {
|
|
|
157
171
|
message MsgHeader {
|
|
158
172
|
common.MsgBase base = 1;
|
|
159
173
|
}
|
|
174
|
+
|
|
175
|
+
// Don't Modify This. @czs
|
|
176
|
+
message DMLMsgHeader {
|
|
177
|
+
common.MsgBase base = 1;
|
|
178
|
+
string shardName = 2;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
enum CompactionState {
|
|
182
|
+
UndefiedState = 0;
|
|
183
|
+
Executing = 1;
|
|
184
|
+
Completed = 2;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
enum ConsistencyLevel {
|
|
188
|
+
Strong = 0;
|
|
189
|
+
Session = 1; // default in PyMilvus
|
|
190
|
+
Bounded = 2;
|
|
191
|
+
Eventually = 3;
|
|
192
|
+
Customized = 4; // Users pass their own `guarantee_timestamp`.
|
|
193
|
+
}
|
|
@@ -24,6 +24,10 @@ service MilvusService {
|
|
|
24
24
|
rpc GetPartitionStatistics(GetPartitionStatisticsRequest) returns (GetPartitionStatisticsResponse) {}
|
|
25
25
|
rpc ShowPartitions(ShowPartitionsRequest) returns (ShowPartitionsResponse) {}
|
|
26
26
|
|
|
27
|
+
rpc CreateAlias(CreateAliasRequest) returns (common.Status) {}
|
|
28
|
+
rpc DropAlias(DropAliasRequest) returns (common.Status) {}
|
|
29
|
+
rpc AlterAlias(AlterAliasRequest) returns (common.Status) {}
|
|
30
|
+
|
|
27
31
|
rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
|
|
28
32
|
rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
|
|
29
33
|
rpc GetIndexState(GetIndexStateRequest) returns (GetIndexStateResponse) {}
|
|
@@ -31,11 +35,13 @@ service MilvusService {
|
|
|
31
35
|
rpc DropIndex(DropIndexRequest) returns (common.Status) {}
|
|
32
36
|
|
|
33
37
|
rpc Insert(InsertRequest) returns (MutationResult) {}
|
|
38
|
+
rpc Delete(DeleteRequest) returns (MutationResult) {}
|
|
34
39
|
rpc Search(SearchRequest) returns (SearchResults) {}
|
|
35
40
|
rpc Flush(FlushRequest) returns (FlushResponse) {}
|
|
36
41
|
rpc Query(QueryRequest) returns (QueryResults) {}
|
|
37
42
|
rpc CalcDistance(CalcDistanceRequest) returns (CalcDistanceResults) {}
|
|
38
43
|
|
|
44
|
+
rpc GetFlushState(GetFlushStateRequest) returns (GetFlushStateResponse) {}
|
|
39
45
|
rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
|
|
40
46
|
rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
|
|
41
47
|
|
|
@@ -43,30 +49,81 @@ service MilvusService {
|
|
|
43
49
|
|
|
44
50
|
// TODO: remove
|
|
45
51
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
|
52
|
+
|
|
53
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
54
|
+
rpc GetMetrics(GetMetricsRequest) returns (GetMetricsResponse) {}
|
|
55
|
+
rpc LoadBalance(LoadBalanceRequest) returns (common.Status) {}
|
|
56
|
+
rpc GetCompactionState(GetCompactionStateRequest) returns (GetCompactionStateResponse) {}
|
|
57
|
+
rpc ManualCompaction(ManualCompactionRequest) returns (ManualCompactionResponse) {}
|
|
58
|
+
rpc GetCompactionStateWithPlans(GetCompactionPlansRequest) returns (GetCompactionPlansResponse) {}
|
|
46
59
|
}
|
|
47
60
|
|
|
48
|
-
message
|
|
49
|
-
common.MsgBase base = 1;
|
|
61
|
+
message CreateAliasRequest {
|
|
62
|
+
common.MsgBase base = 1;
|
|
50
63
|
string db_name = 2;
|
|
51
|
-
string collection_name = 3;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
string collection_name = 3;
|
|
65
|
+
string alias = 4;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message DropAliasRequest {
|
|
69
|
+
common.MsgBase base = 1;
|
|
70
|
+
string db_name = 2;
|
|
71
|
+
string alias = 3;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
message AlterAliasRequest{
|
|
75
|
+
common.MsgBase base = 1;
|
|
76
|
+
string db_name = 2;
|
|
77
|
+
string collection_name = 3;
|
|
78
|
+
string alias = 4;
|
|
55
79
|
}
|
|
56
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Create collection in milvus
|
|
83
|
+
*/
|
|
84
|
+
message CreateCollectionRequest {
|
|
85
|
+
// Not useful for now
|
|
86
|
+
common.MsgBase base = 1;
|
|
87
|
+
// Not useful for now
|
|
88
|
+
string db_name = 2;
|
|
89
|
+
// The unique collection name in milvus.(Required)
|
|
90
|
+
string collection_name = 3;
|
|
91
|
+
// The serialized `schema.CollectionSchema`(Required)
|
|
92
|
+
bytes schema = 4;
|
|
93
|
+
// Once set, no modification is allowed (Optional)
|
|
94
|
+
// https://github.com/milvus-io/milvus/issues/6690
|
|
95
|
+
int32 shards_num = 5;
|
|
96
|
+
// The consistency level that the collection used, modification is not supported now.
|
|
97
|
+
common.ConsistencyLevel consistency_level = 6;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Drop collection in milvus, also will drop data in collection.
|
|
102
|
+
*/
|
|
57
103
|
message DropCollectionRequest {
|
|
58
|
-
|
|
104
|
+
// Not useful for now
|
|
105
|
+
common.MsgBase base = 1;
|
|
106
|
+
// Not useful for now
|
|
59
107
|
string db_name = 2;
|
|
60
|
-
|
|
108
|
+
// The unique collection name in milvus.(Required)
|
|
109
|
+
string collection_name = 3;
|
|
61
110
|
}
|
|
62
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Check collection exist in milvus or not.
|
|
114
|
+
*/
|
|
63
115
|
message HasCollectionRequest {
|
|
64
|
-
|
|
116
|
+
// Not useful for now
|
|
117
|
+
common.MsgBase base = 1;
|
|
118
|
+
// Not useful for now
|
|
65
119
|
string db_name = 2;
|
|
66
|
-
|
|
120
|
+
// The collection name you want to check.
|
|
121
|
+
string collection_name = 3;
|
|
122
|
+
// If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
|
|
67
123
|
uint64 time_stamp = 4;
|
|
68
124
|
}
|
|
69
125
|
|
|
126
|
+
|
|
70
127
|
message BoolResponse {
|
|
71
128
|
common.Status status = 1;
|
|
72
129
|
bool value = 2;
|
|
@@ -77,109 +134,224 @@ message StringResponse {
|
|
|
77
134
|
string value = 2;
|
|
78
135
|
}
|
|
79
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Get collection meta datas like: schema, collectionID, shards number ...
|
|
139
|
+
*/
|
|
80
140
|
message DescribeCollectionRequest {
|
|
81
|
-
|
|
141
|
+
// Not useful for now
|
|
142
|
+
common.MsgBase base = 1;
|
|
143
|
+
// Not useful for now
|
|
82
144
|
string db_name = 2;
|
|
83
|
-
|
|
145
|
+
// The collection name you want to describe, you can pass collection_name or collectionID
|
|
146
|
+
string collection_name = 3;
|
|
147
|
+
// The collection ID you want to describe
|
|
84
148
|
int64 collectionID = 4;
|
|
149
|
+
// If time_stamp is not zero, will describe collection success when time_stamp >= created collection timestamp, otherwise will throw error.
|
|
85
150
|
uint64 time_stamp = 5;
|
|
86
151
|
}
|
|
87
152
|
|
|
153
|
+
/**
|
|
154
|
+
* DescribeCollection Response
|
|
155
|
+
*/
|
|
88
156
|
message DescribeCollectionResponse {
|
|
157
|
+
// Contain error_code and reason
|
|
89
158
|
common.Status status = 1;
|
|
159
|
+
// The schema param when you created collection.
|
|
90
160
|
schema.CollectionSchema schema = 2;
|
|
161
|
+
// The collection id
|
|
91
162
|
int64 collectionID = 3;
|
|
163
|
+
// System design related, users should not perceive
|
|
92
164
|
repeated string virtual_channel_names = 4;
|
|
165
|
+
// System design related, users should not perceive
|
|
93
166
|
repeated string physical_channel_names = 5;
|
|
94
|
-
|
|
95
|
-
uint64
|
|
96
|
-
|
|
97
|
-
|
|
167
|
+
// Hybrid timestamp in milvus
|
|
168
|
+
uint64 created_timestamp = 6;
|
|
169
|
+
// The utc timestamp calculated by created_timestamp
|
|
170
|
+
uint64 created_utc_timestamp = 7;
|
|
171
|
+
// The shards number you set.
|
|
172
|
+
int32 shards_num = 8;
|
|
173
|
+
// The aliases of this collection
|
|
174
|
+
repeated string aliases = 9;
|
|
175
|
+
// The message ID/posititon when collection is created
|
|
176
|
+
repeated common.KeyDataPair start_positions = 10;
|
|
177
|
+
// The consistency level that the collection used, modification is not supported now.
|
|
178
|
+
common.ConsistencyLevel consistency_level = 11;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Load collection data into query nodes, then you can do vector search on this collection.
|
|
183
|
+
*/
|
|
98
184
|
message LoadCollectionRequest {
|
|
99
|
-
|
|
185
|
+
// Not useful for now
|
|
186
|
+
common.MsgBase base = 1;
|
|
187
|
+
// Not useful for now
|
|
100
188
|
string db_name = 2;
|
|
101
|
-
|
|
189
|
+
// The collection name you want to load
|
|
190
|
+
string collection_name = 3;
|
|
102
191
|
}
|
|
103
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Release collection data from query nodes, then you can't do vector search on this collection.
|
|
195
|
+
*/
|
|
104
196
|
message ReleaseCollectionRequest {
|
|
105
|
-
|
|
197
|
+
// Not useful for now
|
|
198
|
+
common.MsgBase base = 1;
|
|
199
|
+
// Not useful for now
|
|
106
200
|
string db_name = 2;
|
|
107
|
-
|
|
201
|
+
// The collection name you want to release
|
|
202
|
+
string collection_name = 3;
|
|
108
203
|
}
|
|
109
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Get collection statistics like row_count.
|
|
207
|
+
*/
|
|
110
208
|
message GetCollectionStatisticsRequest {
|
|
111
|
-
|
|
209
|
+
// Not useful for now
|
|
210
|
+
common.MsgBase base = 1;
|
|
211
|
+
// Not useful for now
|
|
112
212
|
string db_name = 2;
|
|
113
|
-
|
|
213
|
+
// The collection name you want get statistics
|
|
214
|
+
string collection_name = 3;
|
|
114
215
|
}
|
|
115
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Will return collection statistics in stats field like [{key:"row_count",value:"1"}]
|
|
219
|
+
*/
|
|
116
220
|
message GetCollectionStatisticsResponse {
|
|
221
|
+
// Contain error_code and reason
|
|
117
222
|
common.Status status = 1;
|
|
223
|
+
// Collection statistics data
|
|
118
224
|
repeated common.KeyValuePair stats = 2;
|
|
119
225
|
}
|
|
120
226
|
|
|
227
|
+
/*
|
|
228
|
+
* This is for ShowCollectionsRequest type field.
|
|
229
|
+
*/
|
|
121
230
|
enum ShowType {
|
|
231
|
+
// Will return all colloections
|
|
122
232
|
All = 0;
|
|
233
|
+
// Will return loaded collections with their inMemory_percentages
|
|
123
234
|
InMemory = 1;
|
|
124
235
|
}
|
|
125
236
|
|
|
237
|
+
/*
|
|
238
|
+
* List collections
|
|
239
|
+
*/
|
|
126
240
|
message ShowCollectionsRequest {
|
|
127
|
-
|
|
241
|
+
// Not useful for now
|
|
242
|
+
common.MsgBase base = 1;
|
|
243
|
+
// Not useful for now
|
|
128
244
|
string db_name = 2;
|
|
245
|
+
// Not useful for now
|
|
129
246
|
uint64 time_stamp = 3;
|
|
247
|
+
// Decide return Loaded collections or All collections(Optional)
|
|
130
248
|
ShowType type = 4;
|
|
131
|
-
|
|
249
|
+
// When type is InMemory, will return these collection's inMemory_percentages.(Optional)
|
|
250
|
+
repeated string collection_names = 5;
|
|
132
251
|
}
|
|
133
252
|
|
|
253
|
+
/*
|
|
254
|
+
* Return basic collection infos.
|
|
255
|
+
*/
|
|
134
256
|
message ShowCollectionsResponse {
|
|
257
|
+
// Contain error_code and reason
|
|
135
258
|
common.Status status = 1;
|
|
259
|
+
// Collection name array
|
|
136
260
|
repeated string collection_names = 2;
|
|
261
|
+
// Collection Id array
|
|
137
262
|
repeated int64 collection_ids = 3;
|
|
138
|
-
|
|
139
|
-
repeated uint64
|
|
140
|
-
|
|
263
|
+
// Hybrid timestamps in milvus
|
|
264
|
+
repeated uint64 created_timestamps = 4;
|
|
265
|
+
// The utc timestamp calculated by created_timestamp
|
|
266
|
+
repeated uint64 created_utc_timestamps = 5;
|
|
267
|
+
// Load percentage on querynode when type is InMemory
|
|
268
|
+
repeated int64 inMemory_percentages = 6;
|
|
141
269
|
}
|
|
142
270
|
|
|
271
|
+
/*
|
|
272
|
+
* Create partition in created collection.
|
|
273
|
+
*/
|
|
143
274
|
message CreatePartitionRequest {
|
|
144
|
-
|
|
275
|
+
// Not useful for now
|
|
276
|
+
common.MsgBase base = 1;
|
|
277
|
+
// Not useful for now
|
|
145
278
|
string db_name = 2;
|
|
146
|
-
|
|
147
|
-
string
|
|
279
|
+
// The collection name in milvus
|
|
280
|
+
string collection_name = 3;
|
|
281
|
+
// The partition name you want to create.
|
|
282
|
+
string partition_name = 4;
|
|
148
283
|
}
|
|
149
284
|
|
|
285
|
+
/*
|
|
286
|
+
* Drop partition in created collection.
|
|
287
|
+
*/
|
|
150
288
|
message DropPartitionRequest {
|
|
151
|
-
|
|
289
|
+
// Not useful for now
|
|
290
|
+
common.MsgBase base = 1;
|
|
291
|
+
// Not useful for now
|
|
152
292
|
string db_name = 2;
|
|
153
|
-
|
|
154
|
-
string
|
|
293
|
+
// The collection name in milvus
|
|
294
|
+
string collection_name = 3;
|
|
295
|
+
// The partition name you want to drop
|
|
296
|
+
string partition_name = 4;
|
|
155
297
|
}
|
|
156
298
|
|
|
299
|
+
/*
|
|
300
|
+
* Check if partition exist in collection or not.
|
|
301
|
+
*/
|
|
157
302
|
message HasPartitionRequest {
|
|
158
|
-
|
|
303
|
+
// Not useful for now
|
|
304
|
+
common.MsgBase base = 1;
|
|
305
|
+
// Not useful for now
|
|
159
306
|
string db_name = 2;
|
|
160
|
-
|
|
161
|
-
string
|
|
307
|
+
// The collection name in milvus
|
|
308
|
+
string collection_name = 3;
|
|
309
|
+
// The partition name you want to check
|
|
310
|
+
string partition_name = 4;
|
|
162
311
|
}
|
|
163
312
|
|
|
313
|
+
/*
|
|
314
|
+
* Load specific partitions data of one collection into query nodes
|
|
315
|
+
* Then you can get these data as result when you do vector search on this collection.
|
|
316
|
+
*/
|
|
164
317
|
message LoadPartitionsRequest {
|
|
165
|
-
|
|
318
|
+
// Not useful for now
|
|
319
|
+
common.MsgBase base = 1;
|
|
320
|
+
// Not useful for now
|
|
166
321
|
string db_name = 2;
|
|
167
|
-
|
|
168
|
-
|
|
322
|
+
// The collection name in milvus
|
|
323
|
+
string collection_name = 3;
|
|
324
|
+
// The partition names you want to load
|
|
325
|
+
repeated string partition_names = 4;
|
|
169
326
|
}
|
|
170
327
|
|
|
328
|
+
/*
|
|
329
|
+
* Release specific partitions data of one collection from query nodes.
|
|
330
|
+
* Then you can not get these data as result when you do vector search on this collection.
|
|
331
|
+
*/
|
|
171
332
|
message ReleasePartitionsRequest {
|
|
172
|
-
|
|
333
|
+
// Not useful for now
|
|
334
|
+
common.MsgBase base = 1;
|
|
335
|
+
// Not useful for now
|
|
173
336
|
string db_name = 2;
|
|
174
|
-
|
|
175
|
-
|
|
337
|
+
// The collection name in milvus
|
|
338
|
+
string collection_name = 3;
|
|
339
|
+
// The partition names you want to release
|
|
340
|
+
repeated string partition_names = 4;
|
|
176
341
|
}
|
|
177
342
|
|
|
343
|
+
/*
|
|
344
|
+
* Get partition statistics like row_count.
|
|
345
|
+
*/
|
|
178
346
|
message GetPartitionStatisticsRequest {
|
|
179
|
-
|
|
347
|
+
// Not useful for now
|
|
348
|
+
common.MsgBase base = 1;
|
|
349
|
+
// Not useful for now
|
|
180
350
|
string db_name = 2;
|
|
181
|
-
|
|
182
|
-
string
|
|
351
|
+
// The collection name in milvus
|
|
352
|
+
string collection_name = 3;
|
|
353
|
+
// The partition name you want to collect statistics
|
|
354
|
+
string partition_name = 4;
|
|
183
355
|
}
|
|
184
356
|
|
|
185
357
|
message GetPartitionStatisticsResponse {
|
|
@@ -187,22 +359,41 @@ message GetPartitionStatisticsResponse {
|
|
|
187
359
|
repeated common.KeyValuePair stats = 2;
|
|
188
360
|
}
|
|
189
361
|
|
|
362
|
+
/*
|
|
363
|
+
* List all partitions for particular collection
|
|
364
|
+
*/
|
|
190
365
|
message ShowPartitionsRequest {
|
|
191
|
-
|
|
366
|
+
// Not useful for now
|
|
367
|
+
common.MsgBase base = 1;
|
|
368
|
+
// Not useful for now
|
|
192
369
|
string db_name = 2;
|
|
193
|
-
|
|
370
|
+
// The collection name you want to describe, you can pass collection_name or collectionID
|
|
371
|
+
string collection_name = 3;
|
|
372
|
+
// The collection id in milvus
|
|
194
373
|
int64 collectionID = 4;
|
|
195
|
-
|
|
374
|
+
// When type is InMemory, will return these patitions's inMemory_percentages.(Optional)
|
|
375
|
+
repeated string partition_names = 5;
|
|
376
|
+
// Decide return Loaded partitions or All partitions(Optional)
|
|
196
377
|
ShowType type = 6;
|
|
197
378
|
}
|
|
198
379
|
|
|
380
|
+
/*
|
|
381
|
+
* List all partitions for particular collection response.
|
|
382
|
+
* The returned datas are all rows, we can format to columns by therir index.
|
|
383
|
+
*/
|
|
199
384
|
message ShowPartitionsResponse {
|
|
385
|
+
// Contain error_code and reason
|
|
200
386
|
common.Status status = 1;
|
|
387
|
+
// All partition names for this collection
|
|
201
388
|
repeated string partition_names = 2;
|
|
389
|
+
// All partition ids for this collection
|
|
202
390
|
repeated int64 partitionIDs = 3;
|
|
203
|
-
|
|
204
|
-
repeated uint64
|
|
205
|
-
|
|
391
|
+
// All hybrid timestamps
|
|
392
|
+
repeated uint64 created_timestamps = 4;
|
|
393
|
+
// All utc timestamps calculated by created_timestamps
|
|
394
|
+
repeated uint64 created_utc_timestamps = 5;
|
|
395
|
+
// Load percentage on querynode
|
|
396
|
+
repeated int64 inMemory_percentages = 6;
|
|
206
397
|
}
|
|
207
398
|
|
|
208
399
|
message DescribeSegmentRequest {
|
|
@@ -216,6 +407,7 @@ message DescribeSegmentResponse {
|
|
|
216
407
|
int64 indexID = 2;
|
|
217
408
|
int64 buildID = 3;
|
|
218
409
|
bool enable_index = 4;
|
|
410
|
+
int64 fieldID = 5;
|
|
219
411
|
}
|
|
220
412
|
|
|
221
413
|
message ShowSegmentsRequest {
|
|
@@ -229,40 +421,77 @@ message ShowSegmentsResponse {
|
|
|
229
421
|
repeated int64 segmentIDs = 2;
|
|
230
422
|
}
|
|
231
423
|
|
|
424
|
+
/*
|
|
425
|
+
* Create index for vector datas
|
|
426
|
+
*/
|
|
232
427
|
message CreateIndexRequest {
|
|
233
|
-
|
|
428
|
+
// Not useful for now
|
|
429
|
+
common.MsgBase base = 1;
|
|
430
|
+
// Not useful for now
|
|
234
431
|
string db_name = 2;
|
|
235
|
-
|
|
236
|
-
string
|
|
237
|
-
|
|
432
|
+
// The particular collection name you want to create index.
|
|
433
|
+
string collection_name = 3;
|
|
434
|
+
// The vector field name in this particular collection
|
|
435
|
+
string field_name = 4;
|
|
436
|
+
// Support keys: index_type,metric_type, params. Different index_type may has different params.
|
|
437
|
+
repeated common.KeyValuePair extra_params = 5;
|
|
238
438
|
}
|
|
239
439
|
|
|
440
|
+
/*
|
|
441
|
+
* Get created index information.
|
|
442
|
+
* Current release of Milvus only supports showing latest built index.
|
|
443
|
+
*/
|
|
240
444
|
message DescribeIndexRequest {
|
|
241
|
-
|
|
445
|
+
// Not useful for now
|
|
446
|
+
common.MsgBase base = 1;
|
|
447
|
+
// Not useful for now
|
|
242
448
|
string db_name = 2;
|
|
243
|
-
|
|
449
|
+
// The particular collection name in Milvus
|
|
450
|
+
string collection_name = 3;
|
|
451
|
+
// The vector field name in this particular collection
|
|
244
452
|
string field_name = 4;
|
|
245
|
-
|
|
453
|
+
// No need to set up for now @2021.06.30
|
|
454
|
+
string index_name = 5;
|
|
246
455
|
}
|
|
247
456
|
|
|
457
|
+
/*
|
|
458
|
+
* Index informations
|
|
459
|
+
*/
|
|
248
460
|
message IndexDescription {
|
|
461
|
+
// Index name
|
|
249
462
|
string index_name = 1;
|
|
463
|
+
// Index id
|
|
250
464
|
int64 indexID = 2;
|
|
465
|
+
// Will return index_type, metric_type, params(like nlist).
|
|
251
466
|
repeated common.KeyValuePair params = 3;
|
|
467
|
+
// The vector field name
|
|
252
468
|
string field_name = 4;
|
|
253
469
|
}
|
|
254
470
|
|
|
471
|
+
/*
|
|
472
|
+
* Describe index response
|
|
473
|
+
*/
|
|
255
474
|
message DescribeIndexResponse {
|
|
475
|
+
// Response status
|
|
256
476
|
common.Status status = 1;
|
|
477
|
+
// All index informations, for now only return tha latest index you created for the collection.
|
|
257
478
|
repeated IndexDescription index_descriptions = 2;
|
|
258
479
|
}
|
|
259
480
|
|
|
481
|
+
/*
|
|
482
|
+
* Get index building progress
|
|
483
|
+
*/
|
|
260
484
|
message GetIndexBuildProgressRequest {
|
|
261
|
-
|
|
485
|
+
// Not useful for now
|
|
486
|
+
common.MsgBase base = 1;
|
|
487
|
+
// Not useful for now
|
|
262
488
|
string db_name = 2 ;
|
|
263
|
-
|
|
489
|
+
// The collection name in milvus
|
|
490
|
+
string collection_name = 3;
|
|
491
|
+
// The vector field name in this collection
|
|
264
492
|
string field_name = 4;
|
|
265
|
-
|
|
493
|
+
// Not useful for now
|
|
494
|
+
string index_name = 5;
|
|
266
495
|
}
|
|
267
496
|
|
|
268
497
|
message GetIndexBuildProgressResponse {
|
|
@@ -315,6 +544,15 @@ message MutationResult {
|
|
|
315
544
|
uint64 timestamp = 9;
|
|
316
545
|
}
|
|
317
546
|
|
|
547
|
+
message DeleteRequest {
|
|
548
|
+
common.MsgBase base = 1;
|
|
549
|
+
string db_name = 2;
|
|
550
|
+
string collection_name = 3;
|
|
551
|
+
string partition_name = 4;
|
|
552
|
+
string expr = 5;
|
|
553
|
+
repeated uint32 hash_keys = 6;
|
|
554
|
+
}
|
|
555
|
+
|
|
318
556
|
enum PlaceholderType {
|
|
319
557
|
None = 0;
|
|
320
558
|
BinaryVector = 100;
|
|
@@ -443,6 +681,8 @@ message QuerySegmentInfo {
|
|
|
443
681
|
int64 num_rows = 5;
|
|
444
682
|
string index_name = 6;
|
|
445
683
|
int64 indexID = 7;
|
|
684
|
+
int64 nodeID = 8;
|
|
685
|
+
common.SegmentState state = 9;
|
|
446
686
|
}
|
|
447
687
|
|
|
448
688
|
message GetQuerySegmentInfoRequest {
|
|
@@ -483,6 +723,62 @@ message GetMetricsResponse {
|
|
|
483
723
|
string component_name = 3; // metrics from which component
|
|
484
724
|
}
|
|
485
725
|
|
|
726
|
+
/*
|
|
727
|
+
* Do load balancing operation from src_nodeID to dst_nodeID.
|
|
728
|
+
*/
|
|
729
|
+
message LoadBalanceRequest {
|
|
730
|
+
common.MsgBase base = 1;
|
|
731
|
+
int64 src_nodeID = 2;
|
|
732
|
+
repeated int64 dst_nodeIDs = 3;
|
|
733
|
+
repeated int64 sealed_segmentIDs = 4;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
message ManualCompactionRequest {
|
|
737
|
+
int64 collectionID = 1;
|
|
738
|
+
uint64 timetravel = 2;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
message ManualCompactionResponse {
|
|
742
|
+
common.Status status = 1;
|
|
743
|
+
int64 compactionID = 2;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
message GetCompactionStateRequest {
|
|
747
|
+
int64 compactionID = 1;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
message GetCompactionStateResponse {
|
|
751
|
+
common.Status status = 1;
|
|
752
|
+
common.CompactionState state = 2;
|
|
753
|
+
int64 executingPlanNo = 3;
|
|
754
|
+
int64 timeoutPlanNo = 4;
|
|
755
|
+
int64 completedPlanNo = 5;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
message GetCompactionPlansRequest {
|
|
759
|
+
int64 compactionID = 1;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
message GetCompactionPlansResponse {
|
|
763
|
+
common.Status status = 1;
|
|
764
|
+
common.CompactionState state = 2;
|
|
765
|
+
repeated CompactionMergeInfo mergeInfos = 3;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
message CompactionMergeInfo {
|
|
769
|
+
repeated int64 sources = 1;
|
|
770
|
+
int64 target = 2;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
message GetFlushStateRequest {
|
|
774
|
+
repeated int64 segmentIDs = 1;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
message GetFlushStateResponse {
|
|
778
|
+
common.Status status = 1;
|
|
779
|
+
bool flushed = 2;
|
|
780
|
+
}
|
|
781
|
+
|
|
486
782
|
service ProxyService {
|
|
487
783
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
|
488
784
|
}
|