@zilliz/milvus2-sdk-node 1.0.17 → 1.1.0
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 +35 -0
- package/dist/grpc-proto/milvus.proto +315 -52
- 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 +141 -6
- package/dist/milvus/Data.js +304 -21
- 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.d.ts +12 -1
- package/dist/milvus/index.js +77 -4
- 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 +47 -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 +4 -3
- package/dist/milvus/types.d.ts +3 -3
- 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/milvus/utils/index.d.ts +1 -0
- package/dist/milvus/utils/index.js +5 -1
- package/dist/milvus/utils/index.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 +7 -4
- 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,14 @@ 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;
|
|
144
|
+
GetSegmentState = 603;
|
|
130
145
|
|
|
131
146
|
/* SYSTEM CONTROL */
|
|
132
147
|
TimeTick = 1200;
|
|
@@ -157,3 +172,23 @@ enum DslType {
|
|
|
157
172
|
message MsgHeader {
|
|
158
173
|
common.MsgBase base = 1;
|
|
159
174
|
}
|
|
175
|
+
|
|
176
|
+
// Don't Modify This. @czs
|
|
177
|
+
message DMLMsgHeader {
|
|
178
|
+
common.MsgBase base = 1;
|
|
179
|
+
string shardName = 2;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
enum CompactionState {
|
|
183
|
+
UndefiedState = 0;
|
|
184
|
+
Executing = 1;
|
|
185
|
+
Completed = 2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
enum ConsistencyLevel {
|
|
189
|
+
Strong = 0;
|
|
190
|
+
Session = 1; // default in PyMilvus
|
|
191
|
+
Bounded = 2;
|
|
192
|
+
Eventually = 3;
|
|
193
|
+
Customized = 4; // Users pass their own `guarantee_timestamp`.
|
|
194
|
+
}
|
|
@@ -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) {}
|
|
@@ -37,6 +41,7 @@ service MilvusService {
|
|
|
37
41
|
rpc Query(QueryRequest) returns (QueryResults) {}
|
|
38
42
|
rpc CalcDistance(CalcDistanceRequest) returns (CalcDistanceResults) {}
|
|
39
43
|
|
|
44
|
+
rpc GetFlushState(GetFlushStateRequest) returns (GetFlushStateResponse) {}
|
|
40
45
|
rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
|
|
41
46
|
rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
|
|
42
47
|
|
|
@@ -47,10 +52,34 @@ service MilvusService {
|
|
|
47
52
|
|
|
48
53
|
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
|
|
49
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) {}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message CreateAliasRequest {
|
|
62
|
+
common.MsgBase base = 1;
|
|
63
|
+
string db_name = 2;
|
|
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;
|
|
50
79
|
}
|
|
51
80
|
|
|
52
81
|
/**
|
|
53
|
-
* Create collection in milvus
|
|
82
|
+
* Create collection in milvus
|
|
54
83
|
*/
|
|
55
84
|
message CreateCollectionRequest {
|
|
56
85
|
// Not useful for now
|
|
@@ -62,7 +91,10 @@ message CreateCollectionRequest {
|
|
|
62
91
|
// The serialized `schema.CollectionSchema`(Required)
|
|
63
92
|
bytes schema = 4;
|
|
64
93
|
// Once set, no modification is allowed (Optional)
|
|
94
|
+
// https://github.com/milvus-io/milvus/issues/6690
|
|
65
95
|
int32 shards_num = 5;
|
|
96
|
+
// The consistency level that the collection used, modification is not supported now.
|
|
97
|
+
common.ConsistencyLevel consistency_level = 6;
|
|
66
98
|
}
|
|
67
99
|
|
|
68
100
|
/**
|
|
@@ -87,10 +119,11 @@ message HasCollectionRequest {
|
|
|
87
119
|
string db_name = 2;
|
|
88
120
|
// The collection name you want to check.
|
|
89
121
|
string collection_name = 3;
|
|
90
|
-
//
|
|
122
|
+
// If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
|
|
91
123
|
uint64 time_stamp = 4;
|
|
92
124
|
}
|
|
93
125
|
|
|
126
|
+
|
|
94
127
|
message BoolResponse {
|
|
95
128
|
common.Status status = 1;
|
|
96
129
|
bool value = 2;
|
|
@@ -101,110 +134,224 @@ message StringResponse {
|
|
|
101
134
|
string value = 2;
|
|
102
135
|
}
|
|
103
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Get collection meta datas like: schema, collectionID, shards number ...
|
|
139
|
+
*/
|
|
104
140
|
message DescribeCollectionRequest {
|
|
105
|
-
|
|
141
|
+
// Not useful for now
|
|
142
|
+
common.MsgBase base = 1;
|
|
143
|
+
// Not useful for now
|
|
106
144
|
string db_name = 2;
|
|
107
|
-
|
|
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
|
|
108
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.
|
|
109
150
|
uint64 time_stamp = 5;
|
|
110
151
|
}
|
|
111
152
|
|
|
153
|
+
/**
|
|
154
|
+
* DescribeCollection Response
|
|
155
|
+
*/
|
|
112
156
|
message DescribeCollectionResponse {
|
|
157
|
+
// Contain error_code and reason
|
|
113
158
|
common.Status status = 1;
|
|
159
|
+
// The schema param when you created collection.
|
|
114
160
|
schema.CollectionSchema schema = 2;
|
|
161
|
+
// The collection id
|
|
115
162
|
int64 collectionID = 3;
|
|
163
|
+
// System design related, users should not perceive
|
|
116
164
|
repeated string virtual_channel_names = 4;
|
|
165
|
+
// System design related, users should not perceive
|
|
117
166
|
repeated string physical_channel_names = 5;
|
|
118
|
-
|
|
119
|
-
uint64
|
|
120
|
-
|
|
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;
|
|
121
179
|
}
|
|
122
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Load collection data into query nodes, then you can do vector search on this collection.
|
|
183
|
+
*/
|
|
123
184
|
message LoadCollectionRequest {
|
|
124
|
-
|
|
185
|
+
// Not useful for now
|
|
186
|
+
common.MsgBase base = 1;
|
|
187
|
+
// Not useful for now
|
|
125
188
|
string db_name = 2;
|
|
126
|
-
|
|
189
|
+
// The collection name you want to load
|
|
190
|
+
string collection_name = 3;
|
|
127
191
|
}
|
|
128
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Release collection data from query nodes, then you can't do vector search on this collection.
|
|
195
|
+
*/
|
|
129
196
|
message ReleaseCollectionRequest {
|
|
130
|
-
|
|
197
|
+
// Not useful for now
|
|
198
|
+
common.MsgBase base = 1;
|
|
199
|
+
// Not useful for now
|
|
131
200
|
string db_name = 2;
|
|
132
|
-
|
|
201
|
+
// The collection name you want to release
|
|
202
|
+
string collection_name = 3;
|
|
133
203
|
}
|
|
134
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Get collection statistics like row_count.
|
|
207
|
+
*/
|
|
135
208
|
message GetCollectionStatisticsRequest {
|
|
136
|
-
|
|
209
|
+
// Not useful for now
|
|
210
|
+
common.MsgBase base = 1;
|
|
211
|
+
// Not useful for now
|
|
137
212
|
string db_name = 2;
|
|
138
|
-
|
|
213
|
+
// The collection name you want get statistics
|
|
214
|
+
string collection_name = 3;
|
|
139
215
|
}
|
|
140
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Will return collection statistics in stats field like [{key:"row_count",value:"1"}]
|
|
219
|
+
*/
|
|
141
220
|
message GetCollectionStatisticsResponse {
|
|
221
|
+
// Contain error_code and reason
|
|
142
222
|
common.Status status = 1;
|
|
223
|
+
// Collection statistics data
|
|
143
224
|
repeated common.KeyValuePair stats = 2;
|
|
144
225
|
}
|
|
145
226
|
|
|
227
|
+
/*
|
|
228
|
+
* This is for ShowCollectionsRequest type field.
|
|
229
|
+
*/
|
|
146
230
|
enum ShowType {
|
|
231
|
+
// Will return all colloections
|
|
147
232
|
All = 0;
|
|
233
|
+
// Will return loaded collections with their inMemory_percentages
|
|
148
234
|
InMemory = 1;
|
|
149
235
|
}
|
|
150
236
|
|
|
237
|
+
/*
|
|
238
|
+
* List collections
|
|
239
|
+
*/
|
|
151
240
|
message ShowCollectionsRequest {
|
|
152
|
-
|
|
241
|
+
// Not useful for now
|
|
242
|
+
common.MsgBase base = 1;
|
|
243
|
+
// Not useful for now
|
|
153
244
|
string db_name = 2;
|
|
245
|
+
// Not useful for now
|
|
154
246
|
uint64 time_stamp = 3;
|
|
247
|
+
// Decide return Loaded collections or All collections(Optional)
|
|
155
248
|
ShowType type = 4;
|
|
156
|
-
|
|
249
|
+
// When type is InMemory, will return these collection's inMemory_percentages.(Optional)
|
|
250
|
+
repeated string collection_names = 5;
|
|
157
251
|
}
|
|
158
252
|
|
|
253
|
+
/*
|
|
254
|
+
* Return basic collection infos.
|
|
255
|
+
*/
|
|
159
256
|
message ShowCollectionsResponse {
|
|
257
|
+
// Contain error_code and reason
|
|
160
258
|
common.Status status = 1;
|
|
259
|
+
// Collection name array
|
|
161
260
|
repeated string collection_names = 2;
|
|
261
|
+
// Collection Id array
|
|
162
262
|
repeated int64 collection_ids = 3;
|
|
163
|
-
|
|
164
|
-
repeated uint64
|
|
165
|
-
|
|
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;
|
|
166
269
|
}
|
|
167
270
|
|
|
271
|
+
/*
|
|
272
|
+
* Create partition in created collection.
|
|
273
|
+
*/
|
|
168
274
|
message CreatePartitionRequest {
|
|
169
|
-
|
|
275
|
+
// Not useful for now
|
|
276
|
+
common.MsgBase base = 1;
|
|
277
|
+
// Not useful for now
|
|
170
278
|
string db_name = 2;
|
|
171
|
-
|
|
172
|
-
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;
|
|
173
283
|
}
|
|
174
284
|
|
|
285
|
+
/*
|
|
286
|
+
* Drop partition in created collection.
|
|
287
|
+
*/
|
|
175
288
|
message DropPartitionRequest {
|
|
176
|
-
|
|
289
|
+
// Not useful for now
|
|
290
|
+
common.MsgBase base = 1;
|
|
291
|
+
// Not useful for now
|
|
177
292
|
string db_name = 2;
|
|
178
|
-
|
|
179
|
-
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;
|
|
180
297
|
}
|
|
181
298
|
|
|
299
|
+
/*
|
|
300
|
+
* Check if partition exist in collection or not.
|
|
301
|
+
*/
|
|
182
302
|
message HasPartitionRequest {
|
|
183
|
-
|
|
303
|
+
// Not useful for now
|
|
304
|
+
common.MsgBase base = 1;
|
|
305
|
+
// Not useful for now
|
|
184
306
|
string db_name = 2;
|
|
185
|
-
|
|
186
|
-
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;
|
|
187
311
|
}
|
|
188
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
|
+
*/
|
|
189
317
|
message LoadPartitionsRequest {
|
|
190
|
-
|
|
318
|
+
// Not useful for now
|
|
319
|
+
common.MsgBase base = 1;
|
|
320
|
+
// Not useful for now
|
|
191
321
|
string db_name = 2;
|
|
192
|
-
|
|
193
|
-
|
|
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;
|
|
194
326
|
}
|
|
195
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
|
+
*/
|
|
196
332
|
message ReleasePartitionsRequest {
|
|
197
|
-
|
|
333
|
+
// Not useful for now
|
|
334
|
+
common.MsgBase base = 1;
|
|
335
|
+
// Not useful for now
|
|
198
336
|
string db_name = 2;
|
|
199
|
-
|
|
200
|
-
|
|
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;
|
|
201
341
|
}
|
|
202
342
|
|
|
343
|
+
/*
|
|
344
|
+
* Get partition statistics like row_count.
|
|
345
|
+
*/
|
|
203
346
|
message GetPartitionStatisticsRequest {
|
|
204
|
-
|
|
347
|
+
// Not useful for now
|
|
348
|
+
common.MsgBase base = 1;
|
|
349
|
+
// Not useful for now
|
|
205
350
|
string db_name = 2;
|
|
206
|
-
|
|
207
|
-
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;
|
|
208
355
|
}
|
|
209
356
|
|
|
210
357
|
message GetPartitionStatisticsResponse {
|
|
@@ -212,22 +359,41 @@ message GetPartitionStatisticsResponse {
|
|
|
212
359
|
repeated common.KeyValuePair stats = 2;
|
|
213
360
|
}
|
|
214
361
|
|
|
362
|
+
/*
|
|
363
|
+
* List all partitions for particular collection
|
|
364
|
+
*/
|
|
215
365
|
message ShowPartitionsRequest {
|
|
216
|
-
|
|
366
|
+
// Not useful for now
|
|
367
|
+
common.MsgBase base = 1;
|
|
368
|
+
// Not useful for now
|
|
217
369
|
string db_name = 2;
|
|
218
|
-
|
|
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
|
|
219
373
|
int64 collectionID = 4;
|
|
220
|
-
|
|
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)
|
|
221
377
|
ShowType type = 6;
|
|
222
378
|
}
|
|
223
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
|
+
*/
|
|
224
384
|
message ShowPartitionsResponse {
|
|
385
|
+
// Contain error_code and reason
|
|
225
386
|
common.Status status = 1;
|
|
387
|
+
// All partition names for this collection
|
|
226
388
|
repeated string partition_names = 2;
|
|
389
|
+
// All partition ids for this collection
|
|
227
390
|
repeated int64 partitionIDs = 3;
|
|
228
|
-
|
|
229
|
-
repeated uint64
|
|
230
|
-
|
|
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;
|
|
231
397
|
}
|
|
232
398
|
|
|
233
399
|
message DescribeSegmentRequest {
|
|
@@ -241,6 +407,7 @@ message DescribeSegmentResponse {
|
|
|
241
407
|
int64 indexID = 2;
|
|
242
408
|
int64 buildID = 3;
|
|
243
409
|
bool enable_index = 4;
|
|
410
|
+
int64 fieldID = 5;
|
|
244
411
|
}
|
|
245
412
|
|
|
246
413
|
message ShowSegmentsRequest {
|
|
@@ -254,40 +421,77 @@ message ShowSegmentsResponse {
|
|
|
254
421
|
repeated int64 segmentIDs = 2;
|
|
255
422
|
}
|
|
256
423
|
|
|
424
|
+
/*
|
|
425
|
+
* Create index for vector datas
|
|
426
|
+
*/
|
|
257
427
|
message CreateIndexRequest {
|
|
258
|
-
|
|
428
|
+
// Not useful for now
|
|
429
|
+
common.MsgBase base = 1;
|
|
430
|
+
// Not useful for now
|
|
259
431
|
string db_name = 2;
|
|
260
|
-
|
|
261
|
-
string
|
|
262
|
-
|
|
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;
|
|
263
438
|
}
|
|
264
439
|
|
|
440
|
+
/*
|
|
441
|
+
* Get created index information.
|
|
442
|
+
* Current release of Milvus only supports showing latest built index.
|
|
443
|
+
*/
|
|
265
444
|
message DescribeIndexRequest {
|
|
266
|
-
|
|
445
|
+
// Not useful for now
|
|
446
|
+
common.MsgBase base = 1;
|
|
447
|
+
// Not useful for now
|
|
267
448
|
string db_name = 2;
|
|
268
|
-
|
|
449
|
+
// The particular collection name in Milvus
|
|
450
|
+
string collection_name = 3;
|
|
451
|
+
// The vector field name in this particular collection
|
|
269
452
|
string field_name = 4;
|
|
270
|
-
|
|
453
|
+
// No need to set up for now @2021.06.30
|
|
454
|
+
string index_name = 5;
|
|
271
455
|
}
|
|
272
456
|
|
|
457
|
+
/*
|
|
458
|
+
* Index informations
|
|
459
|
+
*/
|
|
273
460
|
message IndexDescription {
|
|
461
|
+
// Index name
|
|
274
462
|
string index_name = 1;
|
|
463
|
+
// Index id
|
|
275
464
|
int64 indexID = 2;
|
|
465
|
+
// Will return index_type, metric_type, params(like nlist).
|
|
276
466
|
repeated common.KeyValuePair params = 3;
|
|
467
|
+
// The vector field name
|
|
277
468
|
string field_name = 4;
|
|
278
469
|
}
|
|
279
470
|
|
|
471
|
+
/*
|
|
472
|
+
* Describe index response
|
|
473
|
+
*/
|
|
280
474
|
message DescribeIndexResponse {
|
|
475
|
+
// Response status
|
|
281
476
|
common.Status status = 1;
|
|
477
|
+
// All index informations, for now only return tha latest index you created for the collection.
|
|
282
478
|
repeated IndexDescription index_descriptions = 2;
|
|
283
479
|
}
|
|
284
480
|
|
|
481
|
+
/*
|
|
482
|
+
* Get index building progress
|
|
483
|
+
*/
|
|
285
484
|
message GetIndexBuildProgressRequest {
|
|
286
|
-
|
|
485
|
+
// Not useful for now
|
|
486
|
+
common.MsgBase base = 1;
|
|
487
|
+
// Not useful for now
|
|
287
488
|
string db_name = 2 ;
|
|
288
|
-
|
|
489
|
+
// The collection name in milvus
|
|
490
|
+
string collection_name = 3;
|
|
491
|
+
// The vector field name in this collection
|
|
289
492
|
string field_name = 4;
|
|
290
|
-
|
|
493
|
+
// Not useful for now
|
|
494
|
+
string index_name = 5;
|
|
291
495
|
}
|
|
292
496
|
|
|
293
497
|
message GetIndexBuildProgressResponse {
|
|
@@ -346,6 +550,7 @@ message DeleteRequest {
|
|
|
346
550
|
string collection_name = 3;
|
|
347
551
|
string partition_name = 4;
|
|
348
552
|
string expr = 5;
|
|
553
|
+
repeated uint32 hash_keys = 6;
|
|
349
554
|
}
|
|
350
555
|
|
|
351
556
|
enum PlaceholderType {
|
|
@@ -476,6 +681,8 @@ message QuerySegmentInfo {
|
|
|
476
681
|
int64 num_rows = 5;
|
|
477
682
|
string index_name = 6;
|
|
478
683
|
int64 indexID = 7;
|
|
684
|
+
int64 nodeID = 8;
|
|
685
|
+
common.SegmentState state = 9;
|
|
479
686
|
}
|
|
480
687
|
|
|
481
688
|
message GetQuerySegmentInfoRequest {
|
|
@@ -516,6 +723,62 @@ message GetMetricsResponse {
|
|
|
516
723
|
string component_name = 3; // metrics from which component
|
|
517
724
|
}
|
|
518
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
|
+
|
|
519
782
|
service ProxyService {
|
|
520
783
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
|
521
784
|
}
|
package/dist/milvus/Client.d.ts
CHANGED
package/dist/milvus/Client.js
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = void 0;
|
|
4
|
+
var ErrorReason_1 = require("./const/ErrorReason");
|
|
4
5
|
var Client = /** @class */ (function () {
|
|
5
6
|
function Client(client) {
|
|
6
7
|
this.client = client;
|
|
7
8
|
}
|
|
9
|
+
Client.prototype.checkCollectionName = function (data) {
|
|
10
|
+
if (!data || !data.collection_name) {
|
|
11
|
+
throw new Error(ErrorReason_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
Client.prototype.checkCollectionAndPartitionName = function (data) {
|
|
15
|
+
if (!data || !data.collection_name || !data.partition_name) {
|
|
16
|
+
throw new Error(ErrorReason_1.ERROR_REASONS.COLLECTION_PARTITION_NAME_ARE_REQUIRED);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
8
19
|
return Client;
|
|
9
20
|
}());
|
|
10
21
|
exports.Client = Client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../milvus/Client.ts"],"names":[],"mappings":";;;AAAA;IAGE,gBAAY,MAAW;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACH,aAAC;AAAD,CAAC,
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../milvus/Client.ts"],"names":[],"mappings":";;;AAAA,mDAAoD;AAEpD;IAGE,gBAAY,MAAW;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,oCAAmB,GAAnB,UAAoB,IAAS;QAC3B,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YAClC,MAAM,IAAI,KAAK,CAAC,2BAAa,CAAC,2BAA2B,CAAC,CAAC;SAC5D;IACH,CAAC;IAED,gDAA+B,GAA/B,UAAgC,IAAS;QACvC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YAC1D,MAAM,IAAI,KAAK,CAAC,2BAAa,CAAC,sCAAsC,CAAC,CAAC;SACvE;IACH,CAAC;IACH,aAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,wBAAM"}
|