@zilliz/milvus2-sdk-node 2.0.1 → 2.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 +5 -0
- package/dist/milvus/Collection.d.ts +1 -0
- package/dist/milvus/Collection.js +9 -8
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.d.ts +5 -5
- package/dist/milvus/Data.js +31 -31
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/User.d.ts +100 -0
- package/dist/milvus/User.js +236 -0
- package/dist/milvus/User.js.map +1 -0
- package/dist/milvus/const/ErrorReason.d.ts +3 -0
- package/dist/milvus/const/ErrorReason.js +3 -0
- package/dist/milvus/const/ErrorReason.js.map +1 -1
- package/dist/milvus/index.d.ts +15 -7
- package/dist/milvus/index.js +30 -5
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +8 -0
- package/dist/milvus/types/Collection.js +9 -1
- package/dist/milvus/types/Collection.js.map +1 -1
- package/dist/milvus/types/Response.d.ts +7 -1
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/User.d.ts +12 -0
- package/dist/milvus/types/User.js +3 -0
- package/dist/milvus/types/User.js.map +1 -0
- package/dist/milvus/types.d.ts +7 -7
- package/dist/milvus/types.js +17 -0
- package/dist/milvus/types.js.map +1 -1
- package/dist/milvus/utils/Format.d.ts +3 -2
- package/dist/milvus/utils/Format.js +3 -1
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/{grpc-proto → proto/proto}/common.proto +107 -1
- package/dist/proto/proto/google/protobuf/descriptor.proto +918 -0
- package/dist/{grpc-proto → proto/proto}/milvus.proto +390 -33
- package/dist/{grpc-proto → proto/proto}/schema.proto +9 -2
- package/dist/sdk.json +1 -1
- package/package.json +6 -4
|
@@ -3,8 +3,14 @@ package milvus.proto.milvus;
|
|
|
3
3
|
|
|
4
4
|
option go_package = "github.com/milvus-io/milvus/internal/proto/milvuspb";
|
|
5
5
|
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
option java_package = "io.milvus.grpc";
|
|
8
|
+
option java_outer_classname = "MilvusProto";
|
|
9
|
+
option java_generate_equals_and_hash = true;
|
|
10
|
+
|
|
6
11
|
import "common.proto";
|
|
7
12
|
import "schema.proto";
|
|
13
|
+
import "google/protobuf/descriptor.proto";
|
|
8
14
|
|
|
9
15
|
service MilvusService {
|
|
10
16
|
rpc CreateCollection(CreateCollectionRequest) returns (common.Status) {}
|
|
@@ -44,6 +50,7 @@ service MilvusService {
|
|
|
44
50
|
rpc GetFlushState(GetFlushStateRequest) returns (GetFlushStateResponse) {}
|
|
45
51
|
rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
|
|
46
52
|
rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
|
|
53
|
+
rpc GetReplicas(GetReplicasRequest) returns (GetReplicasResponse) {}
|
|
47
54
|
|
|
48
55
|
rpc Dummy(DummyRequest) returns (DummyResponse) {}
|
|
49
56
|
|
|
@@ -56,6 +63,27 @@ service MilvusService {
|
|
|
56
63
|
rpc GetCompactionState(GetCompactionStateRequest) returns (GetCompactionStateResponse) {}
|
|
57
64
|
rpc ManualCompaction(ManualCompactionRequest) returns (ManualCompactionResponse) {}
|
|
58
65
|
rpc GetCompactionStateWithPlans(GetCompactionPlansRequest) returns (GetCompactionPlansResponse) {}
|
|
66
|
+
|
|
67
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+24+--+Support+bulk+load
|
|
68
|
+
rpc Import(ImportRequest) returns (ImportResponse) {}
|
|
69
|
+
rpc GetImportState(GetImportStateRequest) returns (GetImportStateResponse) {}
|
|
70
|
+
rpc ListImportTasks(ListImportTasksRequest) returns (ListImportTasksResponse) {}
|
|
71
|
+
|
|
72
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
|
|
73
|
+
rpc CreateCredential(CreateCredentialRequest) returns (common.Status) {}
|
|
74
|
+
rpc UpdateCredential(UpdateCredentialRequest) returns (common.Status) {}
|
|
75
|
+
rpc DeleteCredential(DeleteCredentialRequest) returns (common.Status) {}
|
|
76
|
+
rpc ListCredUsers(ListCredUsersRequest) returns (ListCredUsersResponse) {}
|
|
77
|
+
|
|
78
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+29+--+Support+Role-Based+Access+Control
|
|
79
|
+
rpc CreateRole(CreateRoleRequest) returns (common.Status) {}
|
|
80
|
+
rpc DropRole(DropRoleRequest) returns (common.Status) {}
|
|
81
|
+
rpc OperateUserRole(OperateUserRoleRequest) returns (common.Status) {}
|
|
82
|
+
rpc SelectRole(SelectRoleRequest) returns (SelectRoleResponse) {}
|
|
83
|
+
rpc SelectUser(SelectUserRequest) returns (SelectUserResponse) {}
|
|
84
|
+
rpc SelectResource(SelectResourceRequest) returns (SelectResourceResponse) {}
|
|
85
|
+
rpc OperatePrivilege(OperatePrivilegeRequest) returns (common.Status) {}
|
|
86
|
+
rpc SelectGrant(SelectGrantRequest) returns (SelectGrantResponse) {}
|
|
59
87
|
}
|
|
60
88
|
|
|
61
89
|
message CreateAliasRequest {
|
|
@@ -82,14 +110,19 @@ message AlterAliasRequest{
|
|
|
82
110
|
* Create collection in milvus
|
|
83
111
|
*/
|
|
84
112
|
message CreateCollectionRequest {
|
|
113
|
+
option (common.privilege_ext_obj) = {
|
|
114
|
+
resource_type: Collection
|
|
115
|
+
resource_privilege: PrivilegeCreate
|
|
116
|
+
resource_name_index: 3
|
|
117
|
+
};
|
|
85
118
|
// Not useful for now
|
|
86
119
|
common.MsgBase base = 1;
|
|
87
120
|
// Not useful for now
|
|
88
121
|
string db_name = 2;
|
|
89
122
|
// The unique collection name in milvus.(Required)
|
|
90
|
-
string collection_name = 3;
|
|
123
|
+
string collection_name = 3;
|
|
91
124
|
// The serialized `schema.CollectionSchema`(Required)
|
|
92
|
-
bytes schema = 4;
|
|
125
|
+
bytes schema = 4;
|
|
93
126
|
// Once set, no modification is allowed (Optional)
|
|
94
127
|
// https://github.com/milvus-io/milvus/issues/6690
|
|
95
128
|
int32 shards_num = 5;
|
|
@@ -98,11 +131,16 @@ message CreateCollectionRequest {
|
|
|
98
131
|
}
|
|
99
132
|
|
|
100
133
|
/**
|
|
101
|
-
* Drop collection in milvus, also will drop data in collection.
|
|
134
|
+
* Drop collection in milvus, also will drop data in collection.
|
|
102
135
|
*/
|
|
103
136
|
message DropCollectionRequest {
|
|
137
|
+
option (common.privilege_ext_obj) = {
|
|
138
|
+
resource_type: Collection
|
|
139
|
+
resource_privilege: PrivilegeDrop
|
|
140
|
+
resource_name_index: 3
|
|
141
|
+
};
|
|
104
142
|
// Not useful for now
|
|
105
|
-
common.MsgBase base = 1;
|
|
143
|
+
common.MsgBase base = 1;
|
|
106
144
|
// Not useful for now
|
|
107
145
|
string db_name = 2;
|
|
108
146
|
// The unique collection name in milvus.(Required)
|
|
@@ -113,12 +151,17 @@ message DropCollectionRequest {
|
|
|
113
151
|
* Check collection exist in milvus or not.
|
|
114
152
|
*/
|
|
115
153
|
message HasCollectionRequest {
|
|
154
|
+
option (common.privilege_ext_obj) = {
|
|
155
|
+
resource_type: Collection
|
|
156
|
+
resource_privilege: PrivilegeRead
|
|
157
|
+
resource_name_index: 3
|
|
158
|
+
};
|
|
116
159
|
// Not useful for now
|
|
117
160
|
common.MsgBase base = 1;
|
|
118
161
|
// Not useful for now
|
|
119
162
|
string db_name = 2;
|
|
120
163
|
// The collection name you want to check.
|
|
121
|
-
string collection_name = 3;
|
|
164
|
+
string collection_name = 3;
|
|
122
165
|
// If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
|
|
123
166
|
uint64 time_stamp = 4;
|
|
124
167
|
}
|
|
@@ -138,6 +181,11 @@ message StringResponse {
|
|
|
138
181
|
* Get collection meta datas like: schema, collectionID, shards number ...
|
|
139
182
|
*/
|
|
140
183
|
message DescribeCollectionRequest {
|
|
184
|
+
option (common.privilege_ext_obj) = {
|
|
185
|
+
resource_type: Collection
|
|
186
|
+
resource_privilege: PrivilegeRead
|
|
187
|
+
resource_name_index: 3
|
|
188
|
+
};
|
|
141
189
|
// Not useful for now
|
|
142
190
|
common.MsgBase base = 1;
|
|
143
191
|
// Not useful for now
|
|
@@ -176,24 +224,38 @@ message DescribeCollectionResponse {
|
|
|
176
224
|
repeated common.KeyDataPair start_positions = 10;
|
|
177
225
|
// The consistency level that the collection used, modification is not supported now.
|
|
178
226
|
common.ConsistencyLevel consistency_level = 11;
|
|
227
|
+
// The collection name
|
|
228
|
+
string collection_name = 12;
|
|
179
229
|
}
|
|
180
230
|
|
|
181
231
|
/**
|
|
182
232
|
* Load collection data into query nodes, then you can do vector search on this collection.
|
|
183
233
|
*/
|
|
184
234
|
message LoadCollectionRequest {
|
|
235
|
+
option (common.privilege_ext_obj) = {
|
|
236
|
+
resource_type: Collection
|
|
237
|
+
resource_privilege: PrivilegeLoad
|
|
238
|
+
resource_name_index: 3
|
|
239
|
+
};
|
|
185
240
|
// Not useful for now
|
|
186
241
|
common.MsgBase base = 1;
|
|
187
242
|
// Not useful for now
|
|
188
243
|
string db_name = 2;
|
|
189
244
|
// The collection name you want to load
|
|
190
245
|
string collection_name = 3;
|
|
246
|
+
// The replica number to load, default by 1
|
|
247
|
+
int32 replica_number = 4;
|
|
191
248
|
}
|
|
192
249
|
|
|
193
250
|
/**
|
|
194
251
|
* Release collection data from query nodes, then you can't do vector search on this collection.
|
|
195
252
|
*/
|
|
196
253
|
message ReleaseCollectionRequest {
|
|
254
|
+
option (common.privilege_ext_obj) = {
|
|
255
|
+
resource_type: Collection
|
|
256
|
+
resource_privilege: PrivilegeRelease
|
|
257
|
+
resource_name_index: 3
|
|
258
|
+
};
|
|
197
259
|
// Not useful for now
|
|
198
260
|
common.MsgBase base = 1;
|
|
199
261
|
// Not useful for now
|
|
@@ -206,6 +268,11 @@ message ReleaseCollectionRequest {
|
|
|
206
268
|
* Get collection statistics like row_count.
|
|
207
269
|
*/
|
|
208
270
|
message GetCollectionStatisticsRequest {
|
|
271
|
+
option (common.privilege_ext_obj) = {
|
|
272
|
+
resource_type: Collection
|
|
273
|
+
resource_privilege: PrivilegeRead
|
|
274
|
+
resource_name_index: 3
|
|
275
|
+
};
|
|
209
276
|
// Not useful for now
|
|
210
277
|
common.MsgBase base = 1;
|
|
211
278
|
// Not useful for now
|
|
@@ -228,16 +295,20 @@ message GetCollectionStatisticsResponse {
|
|
|
228
295
|
* This is for ShowCollectionsRequest type field.
|
|
229
296
|
*/
|
|
230
297
|
enum ShowType {
|
|
231
|
-
// Will return all colloections
|
|
298
|
+
// Will return all colloections
|
|
232
299
|
All = 0;
|
|
233
300
|
// Will return loaded collections with their inMemory_percentages
|
|
234
301
|
InMemory = 1;
|
|
235
302
|
}
|
|
236
303
|
|
|
237
304
|
/*
|
|
238
|
-
* List collections
|
|
305
|
+
* List collections
|
|
239
306
|
*/
|
|
240
307
|
message ShowCollectionsRequest {
|
|
308
|
+
option (common.privilege_ext_obj) = {
|
|
309
|
+
resource_type: Collection
|
|
310
|
+
resource_privilege: PrivilegeRead
|
|
311
|
+
};
|
|
241
312
|
// Not useful for now
|
|
242
313
|
common.MsgBase base = 1;
|
|
243
314
|
// Not useful for now
|
|
@@ -247,7 +318,7 @@ message ShowCollectionsRequest {
|
|
|
247
318
|
// Decide return Loaded collections or All collections(Optional)
|
|
248
319
|
ShowType type = 4;
|
|
249
320
|
// When type is InMemory, will return these collection's inMemory_percentages.(Optional)
|
|
250
|
-
repeated string collection_names = 5;
|
|
321
|
+
repeated string collection_names = 5;
|
|
251
322
|
}
|
|
252
323
|
|
|
253
324
|
/*
|
|
@@ -265,7 +336,9 @@ message ShowCollectionsResponse {
|
|
|
265
336
|
// The utc timestamp calculated by created_timestamp
|
|
266
337
|
repeated uint64 created_utc_timestamps = 5;
|
|
267
338
|
// Load percentage on querynode when type is InMemory
|
|
268
|
-
repeated int64 inMemory_percentages = 6;
|
|
339
|
+
repeated int64 inMemory_percentages = 6;
|
|
340
|
+
// Indicate whether query service is available
|
|
341
|
+
repeated bool query_service_available = 7;
|
|
269
342
|
}
|
|
270
343
|
|
|
271
344
|
/*
|
|
@@ -293,7 +366,7 @@ message DropPartitionRequest {
|
|
|
293
366
|
// The collection name in milvus
|
|
294
367
|
string collection_name = 3;
|
|
295
368
|
// The partition name you want to drop
|
|
296
|
-
string partition_name = 4;
|
|
369
|
+
string partition_name = 4;
|
|
297
370
|
}
|
|
298
371
|
|
|
299
372
|
/*
|
|
@@ -323,6 +396,8 @@ message LoadPartitionsRequest {
|
|
|
323
396
|
string collection_name = 3;
|
|
324
397
|
// The partition names you want to load
|
|
325
398
|
repeated string partition_names = 4;
|
|
399
|
+
// The replicas number you would load, 1 by default
|
|
400
|
+
int32 replica_number = 5;
|
|
326
401
|
}
|
|
327
402
|
|
|
328
403
|
/*
|
|
@@ -351,7 +426,7 @@ message GetPartitionStatisticsRequest {
|
|
|
351
426
|
// The collection name in milvus
|
|
352
427
|
string collection_name = 3;
|
|
353
428
|
// The partition name you want to collect statistics
|
|
354
|
-
string partition_name = 4;
|
|
429
|
+
string partition_name = 4;
|
|
355
430
|
}
|
|
356
431
|
|
|
357
432
|
message GetPartitionStatisticsResponse {
|
|
@@ -426,7 +501,7 @@ message ShowSegmentsResponse {
|
|
|
426
501
|
*/
|
|
427
502
|
message CreateIndexRequest {
|
|
428
503
|
// Not useful for now
|
|
429
|
-
common.MsgBase base = 1;
|
|
504
|
+
common.MsgBase base = 1;
|
|
430
505
|
// Not useful for now
|
|
431
506
|
string db_name = 2;
|
|
432
507
|
// The particular collection name you want to create index.
|
|
@@ -434,11 +509,13 @@ message CreateIndexRequest {
|
|
|
434
509
|
// The vector field name in this particular collection
|
|
435
510
|
string field_name = 4;
|
|
436
511
|
// Support keys: index_type,metric_type, params. Different index_type may has different params.
|
|
437
|
-
repeated common.KeyValuePair extra_params = 5;
|
|
512
|
+
repeated common.KeyValuePair extra_params = 5;
|
|
513
|
+
// Version before 2.0.2 doesn't contain index_name, we use default index name.
|
|
514
|
+
string index_name = 6;
|
|
438
515
|
}
|
|
439
516
|
|
|
440
517
|
/*
|
|
441
|
-
* Get created index information.
|
|
518
|
+
* Get created index information.
|
|
442
519
|
* Current release of Milvus only supports showing latest built index.
|
|
443
520
|
*/
|
|
444
521
|
message DescribeIndexRequest {
|
|
@@ -451,7 +528,7 @@ message DescribeIndexRequest {
|
|
|
451
528
|
// The vector field name in this particular collection
|
|
452
529
|
string field_name = 4;
|
|
453
530
|
// No need to set up for now @2021.06.30
|
|
454
|
-
string index_name = 5;
|
|
531
|
+
string index_name = 5;
|
|
455
532
|
}
|
|
456
533
|
|
|
457
534
|
/*
|
|
@@ -479,7 +556,7 @@ message DescribeIndexResponse {
|
|
|
479
556
|
}
|
|
480
557
|
|
|
481
558
|
/*
|
|
482
|
-
* Get index building progress
|
|
559
|
+
* Get index building progress
|
|
483
560
|
*/
|
|
484
561
|
message GetIndexBuildProgressRequest {
|
|
485
562
|
// Not useful for now
|
|
@@ -553,22 +630,6 @@ message DeleteRequest {
|
|
|
553
630
|
repeated uint32 hash_keys = 6;
|
|
554
631
|
}
|
|
555
632
|
|
|
556
|
-
enum PlaceholderType {
|
|
557
|
-
None = 0;
|
|
558
|
-
BinaryVector = 100;
|
|
559
|
-
FloatVector = 101;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
message PlaceholderValue {
|
|
563
|
-
string tag = 1;
|
|
564
|
-
PlaceholderType type = 2;
|
|
565
|
-
// values is a 2d-array, every array contains a vector
|
|
566
|
-
repeated bytes values = 3;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
message PlaceholderGroup {
|
|
570
|
-
repeated PlaceholderValue placeholders = 1;
|
|
571
|
-
}
|
|
572
633
|
|
|
573
634
|
message SearchRequest {
|
|
574
635
|
common.MsgBase base = 1; // must
|
|
@@ -583,6 +644,7 @@ message SearchRequest {
|
|
|
583
644
|
repeated common.KeyValuePair search_params = 9; // must
|
|
584
645
|
uint64 travel_timestamp = 10;
|
|
585
646
|
uint64 guarantee_timestamp = 11; // guarantee_timestamp
|
|
647
|
+
int64 nq = 12;
|
|
586
648
|
}
|
|
587
649
|
|
|
588
650
|
message Hits {
|
|
@@ -594,6 +656,7 @@ message Hits {
|
|
|
594
656
|
message SearchResults {
|
|
595
657
|
common.Status status = 1;
|
|
596
658
|
schema.SearchResultData results = 2;
|
|
659
|
+
string collection_name = 3;
|
|
597
660
|
}
|
|
598
661
|
|
|
599
662
|
message FlushRequest {
|
|
@@ -622,6 +685,7 @@ message QueryRequest {
|
|
|
622
685
|
message QueryResults {
|
|
623
686
|
common.Status status = 1;
|
|
624
687
|
repeated schema.FieldData fields_data = 2;
|
|
688
|
+
string collection_name = 3;
|
|
625
689
|
}
|
|
626
690
|
|
|
627
691
|
message VectorIDs {
|
|
@@ -635,7 +699,7 @@ message VectorsArray {
|
|
|
635
699
|
oneof array {
|
|
636
700
|
VectorIDs id_array = 1; // vector ids
|
|
637
701
|
schema.VectorField data_array = 2; // vectors data
|
|
638
|
-
}
|
|
702
|
+
}
|
|
639
703
|
}
|
|
640
704
|
|
|
641
705
|
message CalcDistanceRequest {
|
|
@@ -681,8 +745,10 @@ message QuerySegmentInfo {
|
|
|
681
745
|
int64 num_rows = 5;
|
|
682
746
|
string index_name = 6;
|
|
683
747
|
int64 indexID = 7;
|
|
748
|
+
// deprecated, check node_ids(NodeIds) field
|
|
684
749
|
int64 nodeID = 8;
|
|
685
750
|
common.SegmentState state = 9;
|
|
751
|
+
repeated int64 nodeIds = 10;
|
|
686
752
|
}
|
|
687
753
|
|
|
688
754
|
message GetQuerySegmentInfoRequest {
|
|
@@ -731,6 +797,7 @@ message LoadBalanceRequest {
|
|
|
731
797
|
int64 src_nodeID = 2;
|
|
732
798
|
repeated int64 dst_nodeIDs = 3;
|
|
733
799
|
repeated int64 sealed_segmentIDs = 4;
|
|
800
|
+
string collectionName = 5;
|
|
734
801
|
}
|
|
735
802
|
|
|
736
803
|
message ManualCompactionRequest {
|
|
@@ -779,6 +846,296 @@ message GetFlushStateResponse {
|
|
|
779
846
|
bool flushed = 2;
|
|
780
847
|
}
|
|
781
848
|
|
|
849
|
+
message ImportRequest {
|
|
850
|
+
string collection_name = 1; // target collection
|
|
851
|
+
string partition_name = 2; // target partition
|
|
852
|
+
repeated string channel_names = 3; // channel names for the collection
|
|
853
|
+
bool row_based = 4; // the file is row-based or column-based
|
|
854
|
+
repeated string files = 5; // file paths to be imported
|
|
855
|
+
repeated common.KeyValuePair options = 6; // import options, bucket, etc.
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
message ImportResponse {
|
|
859
|
+
common.Status status = 1;
|
|
860
|
+
repeated int64 tasks = 2; // id array of import tasks
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
message GetImportStateRequest {
|
|
864
|
+
int64 task = 1; // id of an import task
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
message GetImportStateResponse {
|
|
868
|
+
common.Status status = 1;
|
|
869
|
+
common.ImportState state = 2; // is this import task finished or not
|
|
870
|
+
int64 row_count = 3; // if the task is finished, this value is how many rows are imported. if the task is not finished, this value is how many rows are parsed. return 0 if failed.
|
|
871
|
+
repeated int64 id_list = 4; // auto generated ids if the primary key is autoid
|
|
872
|
+
repeated common.KeyValuePair infos = 5; // more information about the task, progress percent, file path, failed reason, etc.
|
|
873
|
+
int64 id = 6; // id of an import task
|
|
874
|
+
bool data_queryable = 7; // A flag indicating whether import data are queryable (i.e. loaded in query nodes)
|
|
875
|
+
bool data_indexed = 8; // A flag indicating whether import data are indexed.
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
message ListImportTasksRequest {
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
message ListImportTasksResponse {
|
|
882
|
+
common.Status status = 1;
|
|
883
|
+
repeated GetImportStateResponse tasks = 2; // list of all import tasks
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
message GetReplicasRequest {
|
|
887
|
+
common.MsgBase base = 1;
|
|
888
|
+
int64 collectionID = 2;
|
|
889
|
+
bool with_shard_nodes = 3;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
message GetReplicasResponse {
|
|
893
|
+
common.Status status = 1;
|
|
894
|
+
repeated ReplicaInfo replicas = 2;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
message ReplicaInfo { // ReplicaGroup
|
|
898
|
+
int64 replicaID = 1;
|
|
899
|
+
int64 collectionID = 2;
|
|
900
|
+
repeated int64 partition_ids = 3; // empty indicates to load collection
|
|
901
|
+
repeated ShardReplica shard_replicas = 4;
|
|
902
|
+
repeated int64 node_ids = 5; // include leaders
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
message ShardReplica {
|
|
906
|
+
int64 leaderID = 1;
|
|
907
|
+
string leader_addr = 2; // IP:port
|
|
908
|
+
string dm_channel_name = 3;
|
|
909
|
+
// optional, DO NOT save it in meta, set it only for GetReplicas()
|
|
910
|
+
// if with_shard_nodes is true
|
|
911
|
+
repeated int64 node_ids = 4;
|
|
912
|
+
}
|
|
913
|
+
|
|
782
914
|
service ProxyService {
|
|
783
915
|
rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
|
|
784
916
|
}
|
|
917
|
+
|
|
918
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
|
|
919
|
+
|
|
920
|
+
message CreateCredentialRequest {
|
|
921
|
+
// Not useful for now
|
|
922
|
+
common.MsgBase base = 1;
|
|
923
|
+
// username
|
|
924
|
+
string username = 2;
|
|
925
|
+
// ciphertext password
|
|
926
|
+
string password = 3;
|
|
927
|
+
// create time
|
|
928
|
+
uint64 created_utc_timestamps = 4;
|
|
929
|
+
// modify time
|
|
930
|
+
uint64 modified_utc_timestamps = 5;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
message UpdateCredentialRequest {
|
|
934
|
+
// Not useful for now
|
|
935
|
+
common.MsgBase base = 1;
|
|
936
|
+
// username
|
|
937
|
+
string username = 2;
|
|
938
|
+
// old password
|
|
939
|
+
string oldPassword = 3;
|
|
940
|
+
// new password
|
|
941
|
+
string newPassword = 4;
|
|
942
|
+
// create time
|
|
943
|
+
uint64 created_utc_timestamps = 5;
|
|
944
|
+
// modify time
|
|
945
|
+
uint64 modified_utc_timestamps = 6;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
message DeleteCredentialRequest {
|
|
949
|
+
// Not useful for now
|
|
950
|
+
common.MsgBase base = 1;
|
|
951
|
+
// Not useful for now
|
|
952
|
+
string username = 2;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
message ListCredUsersResponse {
|
|
956
|
+
// Contain error_code and reason
|
|
957
|
+
common.Status status = 1;
|
|
958
|
+
// username array
|
|
959
|
+
repeated string usernames = 2;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
message ListCredUsersRequest {
|
|
963
|
+
// Not useful for now
|
|
964
|
+
common.MsgBase base = 1;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// https://wiki.lfaidata.foundation/display/MIL/MEP+29+--+Support+Role-Based+Access+Control
|
|
968
|
+
message RoleEntity {
|
|
969
|
+
string name = 1;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
message UserEntity {
|
|
973
|
+
string name = 1;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
message CreateRoleRequest {
|
|
977
|
+
// Not useful for now
|
|
978
|
+
common.MsgBase base = 1;
|
|
979
|
+
// role
|
|
980
|
+
RoleEntity entity = 2;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
message DropRoleRequest {
|
|
984
|
+
// Not useful for now
|
|
985
|
+
common.MsgBase base = 1;
|
|
986
|
+
// role name
|
|
987
|
+
string role_name = 2;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
enum OperateUserRoleType {
|
|
991
|
+
AddUserToRole = 0;
|
|
992
|
+
RemoveUserFromRole = 1;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
message OperateUserRoleRequest {
|
|
996
|
+
// Not useful for now
|
|
997
|
+
common.MsgBase base = 1;
|
|
998
|
+
// username
|
|
999
|
+
string username = 2;
|
|
1000
|
+
// role name
|
|
1001
|
+
string role_name = 3;
|
|
1002
|
+
// operation type
|
|
1003
|
+
OperateUserRoleType type = 4;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
message SelectRoleRequest {
|
|
1007
|
+
// Not useful for now
|
|
1008
|
+
common.MsgBase base = 1;
|
|
1009
|
+
// role
|
|
1010
|
+
RoleEntity role = 2;
|
|
1011
|
+
// include user info
|
|
1012
|
+
bool include_user_info = 3;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
message RoleResult {
|
|
1016
|
+
RoleEntity role = 1;
|
|
1017
|
+
repeated UserEntity users = 2;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
message SelectRoleResponse {
|
|
1021
|
+
// Not useful for now
|
|
1022
|
+
common.Status status = 1;
|
|
1023
|
+
// role result array
|
|
1024
|
+
repeated RoleResult results = 2;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
message SelectUserRequest {
|
|
1028
|
+
// Not useful for now
|
|
1029
|
+
common.MsgBase base = 1;
|
|
1030
|
+
// user
|
|
1031
|
+
UserEntity user = 2;
|
|
1032
|
+
// include user info
|
|
1033
|
+
bool include_role_info = 3;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
message UserResult {
|
|
1037
|
+
UserEntity user = 1;
|
|
1038
|
+
repeated RoleEntity roles = 2;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
message SelectUserResponse {
|
|
1042
|
+
// Not useful for now
|
|
1043
|
+
common.Status status = 1;
|
|
1044
|
+
// user result array
|
|
1045
|
+
repeated UserResult result = 2;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
message ResourceEntity {
|
|
1049
|
+
string type = 1;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
message PrivilegeEntity {
|
|
1053
|
+
string name = 1;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
message SelectResourceRequest {
|
|
1057
|
+
// Not useful for now
|
|
1058
|
+
common.MsgBase base = 1;
|
|
1059
|
+
// resource
|
|
1060
|
+
ResourceEntity entity = 2;
|
|
1061
|
+
// include privilege info
|
|
1062
|
+
bool include_privilege_info = 3;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
message ResourceResult {
|
|
1066
|
+
ResourceEntity resource = 1;
|
|
1067
|
+
repeated PrivilegeEntity privileges = 2;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
message SelectResourceResponse {
|
|
1071
|
+
// Not useful for now
|
|
1072
|
+
common.Status status = 1;
|
|
1073
|
+
// resource result array
|
|
1074
|
+
repeated ResourceResult results = 2;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
message PrincipalEntity {
|
|
1078
|
+
// principal type, including user, role
|
|
1079
|
+
string principal_type = 1;
|
|
1080
|
+
// principal, including user entity or role entity
|
|
1081
|
+
oneof principal {
|
|
1082
|
+
UserEntity user = 2;
|
|
1083
|
+
RoleEntity role = 3;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
message GrantorEntity {
|
|
1088
|
+
UserEntity user = 1;
|
|
1089
|
+
PrivilegeEntity privilege = 2;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
message GrantEntity {
|
|
1093
|
+
// principal
|
|
1094
|
+
PrincipalEntity principal = 1;
|
|
1095
|
+
// resource
|
|
1096
|
+
ResourceEntity resource = 2;
|
|
1097
|
+
// resource name
|
|
1098
|
+
string resource_name = 3;
|
|
1099
|
+
// privilege
|
|
1100
|
+
GrantorEntity grantor = 4;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
message SelectGrantRequest {
|
|
1104
|
+
// Not useful for now
|
|
1105
|
+
common.MsgBase base = 1;
|
|
1106
|
+
// grant
|
|
1107
|
+
GrantEntity entity = 2;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
message SelectGrantResponse {
|
|
1111
|
+
// Not useful for now
|
|
1112
|
+
common.Status status = 1;
|
|
1113
|
+
// grant info array
|
|
1114
|
+
repeated GrantEntity entities = 2;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
enum OperatePrivilegeType {
|
|
1118
|
+
Grant = 0;
|
|
1119
|
+
Revoke = 1;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
message OperatePrivilegeRequest {
|
|
1123
|
+
// Not useful for now
|
|
1124
|
+
common.MsgBase base = 1;
|
|
1125
|
+
// grant
|
|
1126
|
+
GrantEntity entity = 2;
|
|
1127
|
+
// operation type
|
|
1128
|
+
OperatePrivilegeType type = 3;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
message MilvusExt {
|
|
1132
|
+
string version = 1;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
extend google.protobuf.FileOptions {
|
|
1136
|
+
MilvusExt milvus_ext_obj = 1001;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
option (milvus_ext_obj) = {
|
|
1140
|
+
version: "2.1.0"
|
|
1141
|
+
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
|
-
|
|
3
2
|
package milvus.proto.schema;
|
|
3
|
+
|
|
4
4
|
option go_package = "github.com/milvus-io/milvus/internal/proto/schemapb";
|
|
5
5
|
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
option java_package = "io.milvus.grpc";
|
|
8
|
+
option java_outer_classname = "SchemaProto";
|
|
9
|
+
option java_generate_equals_and_hash = true;
|
|
10
|
+
|
|
6
11
|
import "common.proto";
|
|
7
12
|
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
9
14
|
* @brief Field data type
|
|
10
15
|
*/
|
|
11
16
|
enum DataType {
|
|
@@ -20,6 +25,7 @@ enum DataType {
|
|
|
20
25
|
Double = 11;
|
|
21
26
|
|
|
22
27
|
String = 20;
|
|
28
|
+
VarChar = 21; // variable-length strings with a specified maximum length
|
|
23
29
|
|
|
24
30
|
BinaryVector = 100;
|
|
25
31
|
FloatVector = 101;
|
|
@@ -123,3 +129,4 @@ message SearchResultData {
|
|
|
123
129
|
IDs ids = 5;
|
|
124
130
|
repeated int64 topks = 6;
|
|
125
131
|
}
|
|
132
|
+
|
package/dist/sdk.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0
|
|
1
|
+
{"version":"2.1.0","milvusVersion":"v2.1.0"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zilliz/milvus2-sdk-node",
|
|
3
3
|
"author": "ued@zilliz.com",
|
|
4
|
-
"version": "2.0
|
|
5
|
-
"milvusVersion": "v2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
|
+
"milvusVersion": "v2.1.0",
|
|
6
6
|
"main": "dist/milvus",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
+
"pre": "git submodule update --remote && rm -rf proto/proto/google && mkdir -p proto/proto/google/protobuf && wget https://raw.githubusercontent.com/protocolbuffers/protobuf/main/src/google/protobuf/descriptor.proto -O proto/proto/google/protobuf/descriptor.proto",
|
|
11
12
|
"build": "tsc --declaration && node build.js",
|
|
13
|
+
"testAll": "jest --testPathIgnorePatterns=/test/build/",
|
|
12
14
|
"test": "jest",
|
|
13
|
-
"coverage": "jest --coverage=true --testPathIgnorePatterns=/test/build/",
|
|
15
|
+
"coverage": "jest --coverage=true --config jest.config.js --no-cache --testPathIgnorePatterns=/test/build/ test/User.spec.ts ",
|
|
14
16
|
"build-test": "yarn build && jest test/build/Collection.spec.ts",
|
|
15
17
|
"example": "npx ts-node",
|
|
16
18
|
"doc": "rm -rf docs && npx typedoc && node doc",
|
|
@@ -23,7 +25,7 @@
|
|
|
23
25
|
"@microsoft/api-extractor": "^7.18.5",
|
|
24
26
|
"json-schema": "^0.4.0",
|
|
25
27
|
"node-forge": "^1.0.0",
|
|
26
|
-
"protobufjs": "^6.11.
|
|
28
|
+
"protobufjs": "^6.11.3"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@babel/plugin-transform-modules-commonjs": "^7.13.8",
|