@zilliz/milvus2-sdk-node 1.0.18 → 2.0.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.
Files changed (49) hide show
  1. package/README.md +19 -7
  2. package/dist/grpc-proto/common.proto +21 -1
  3. package/dist/grpc-proto/milvus.proto +138 -18
  4. package/dist/milvus/Client.d.ts +2 -0
  5. package/dist/milvus/Client.js +11 -0
  6. package/dist/milvus/Client.js.map +1 -1
  7. package/dist/milvus/Collection.d.ts +88 -3
  8. package/dist/milvus/Collection.js +213 -19
  9. package/dist/milvus/Collection.js.map +1 -1
  10. package/dist/milvus/Data.d.ts +118 -6
  11. package/dist/milvus/Data.js +253 -54
  12. package/dist/milvus/Data.js.map +1 -1
  13. package/dist/milvus/MilvusIndex.js +15 -3
  14. package/dist/milvus/MilvusIndex.js.map +1 -1
  15. package/dist/milvus/Partition.js +28 -7
  16. package/dist/milvus/Partition.js.map +1 -1
  17. package/dist/milvus/Utils.d.ts +1 -0
  18. package/dist/milvus/Utils.js +8 -0
  19. package/dist/milvus/Utils.js.map +1 -0
  20. package/dist/milvus/const/ErrorReason.d.ts +18 -3
  21. package/dist/milvus/const/ErrorReason.js +17 -2
  22. package/dist/milvus/const/ErrorReason.js.map +1 -1
  23. package/dist/milvus/index.d.ts +12 -1
  24. package/dist/milvus/index.js +77 -4
  25. package/dist/milvus/index.js.map +1 -1
  26. package/dist/milvus/types/Collection.d.ts +27 -10
  27. package/dist/milvus/types/Common.d.ts +5 -0
  28. package/dist/milvus/types/Common.js +7 -1
  29. package/dist/milvus/types/Common.js.map +1 -1
  30. package/dist/milvus/types/Data.d.ts +42 -0
  31. package/dist/milvus/types/{Insert.js → Data.js} +1 -1
  32. package/dist/milvus/types/Data.js.map +1 -0
  33. package/dist/milvus/types/Response.d.ts +46 -7
  34. package/dist/milvus/types/Response.js +1 -1
  35. package/dist/milvus/types/Response.js.map +1 -1
  36. package/dist/milvus/types/Search.d.ts +3 -3
  37. package/dist/milvus/types.d.ts +3 -3
  38. package/dist/milvus/utils/Format.d.ts +69 -0
  39. package/dist/milvus/utils/Format.js +107 -3
  40. package/dist/milvus/utils/Format.js.map +1 -1
  41. package/dist/milvus/utils/Validate.js +9 -1
  42. package/dist/milvus/utils/Validate.js.map +1 -1
  43. package/dist/milvus/utils/index.d.ts +1 -0
  44. package/dist/milvus/utils/index.js +5 -1
  45. package/dist/milvus/utils/index.js.map +1 -1
  46. package/dist/sdk.json +1 -1
  47. package/package.json +5 -3
  48. package/dist/milvus/types/Insert.d.ts +0 -18
  49. package/dist/milvus/types/Insert.js.map +0 -1
package/README.md CHANGED
@@ -1,12 +1,20 @@
1
1
  [![typescript](https://badges.aleen42.com/src/typescript.svg)](https://badges.aleen42.com/src/typescript.svg)
2
2
  [![version](https://img.shields.io/npm/v/@zilliz/milvus2-sdk-node)](https://img.shields.io/npm/v/@zilliz/milvus2-sdk-node)
3
3
  [![downloads](https://img.shields.io/npm/dw/@zilliz/milvus2-sdk-node)](https://img.shields.io/npm/dw/@zilliz/milvus2-sdk-node)
4
- [![codecov](https://codecov.io/gh/milvus-io/milvus-sdk-node/branch/v2.x/graph/badge.svg?token=Zu5FwWstwI)](https://codecov.io/gh/milvus-io/milvus-sdk-node)
4
+ [![codecov](https://codecov.io/gh/milvus-io/milvus-sdk-node/branch/main/graph/badge.svg?token=Zu5FwWstwI)](https://codecov.io/gh/milvus-io/milvus-sdk-node)
5
5
 
6
6
  # Milvus2-sdk-node
7
7
 
8
8
  This is node sdk for [Milvus](https://github.com/milvus-io/milvus).
9
9
 
10
+ ## Compatibility
11
+
12
+ The following collection shows Milvus versions and recommended @zilliz/milvus2-sdk-node versions:
13
+
14
+ | Milvus version | Recommended @zilliz/milvus2-sdk-node version |
15
+ | :------------: | :------------------------------------------: |
16
+ | 2.0.0 | 2.0.0 |
17
+
10
18
  ## Dependencies
11
19
 
12
20
  Milvus: v2+
@@ -19,7 +27,7 @@ Node: v12+
19
27
  npm install @zilliz/milvus2-sdk-node
20
28
  ```
21
29
 
22
- ## API
30
+ ## API Support
23
31
 
24
32
  | Name | Async | Description |
25
33
  | :---------------------- | :---- | :--------------------------------------: |
@@ -45,12 +53,16 @@ Node: v12+
45
53
  | dropIndex | true | Drop index |
46
54
  | insert | false | Insert data into milvus |
47
55
  | search | false | Vector similarity search |
48
- | flush | false | Flush Data |
56
+ | flush | true | Flush Data |
57
+ | flushSync | false | Flush Data Sync |
49
58
  | query | false | Get data by expr |
59
+ | compact | true | Do compaction for the collection |
60
+ | getCompactionState | true | Get compaction states by compact id |
50
61
 
51
62
  ## Example
52
63
 
53
- 1. [How to operate collection](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
54
- 2. [How to insert data](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Insert.ts)
55
- 3. [Vector similarity search on float field](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Search.ts)
56
- 4. [Vector similarity search on binary field](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/BinarySearch.ts)
64
+ 1. [Hello World](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/HelloMilvus.ts)
65
+ 2. [How to operate collection](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
66
+ 3. [How to insert data](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Insert.ts)
67
+ 4. [Vector similarity search on float field](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Search.ts)
68
+ 5. [Vector similarity search on binary field](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/BinarySearch.ts)
@@ -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 {
@@ -133,9 +134,14 @@ enum MsgType {
133
134
  RemoveDmChannels = 509;
134
135
  WatchQueryChannels = 510;
135
136
  RemoveQueryChannels = 511;
137
+ SealedSegmentsChangeInfo = 512;
138
+ WatchDeltaChannels = 513;
136
139
 
137
140
  /* DATA SERVICE */
138
141
  SegmentInfo = 600;
142
+ SystemInfo = 601;
143
+ GetRecoveryInfo = 602;
144
+ GetSegmentState = 603;
139
145
 
140
146
  /* SYSTEM CONTROL */
141
147
  TimeTick = 1200;
@@ -171,4 +177,18 @@ message MsgHeader {
171
177
  message DMLMsgHeader {
172
178
  common.MsgBase base = 1;
173
179
  string shardName = 2;
174
- }
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
+ }
@@ -41,6 +41,7 @@ service MilvusService {
41
41
  rpc Query(QueryRequest) returns (QueryResults) {}
42
42
  rpc CalcDistance(CalcDistanceRequest) returns (CalcDistanceResults) {}
43
43
 
44
+ rpc GetFlushState(GetFlushStateRequest) returns (GetFlushStateResponse) {}
44
45
  rpc GetPersistentSegmentInfo(GetPersistentSegmentInfoRequest) returns (GetPersistentSegmentInfoResponse) {}
45
46
  rpc GetQuerySegmentInfo(GetQuerySegmentInfoRequest) returns (GetQuerySegmentInfoResponse) {}
46
47
 
@@ -51,23 +52,30 @@ service MilvusService {
51
52
 
52
53
  // https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
53
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) {}
54
59
  }
55
60
 
56
61
  message CreateAliasRequest {
57
62
  common.MsgBase base = 1;
58
- string collection_name = 2;
59
- string alias = 3;
63
+ string db_name = 2;
64
+ string collection_name = 3;
65
+ string alias = 4;
60
66
  }
61
67
 
62
68
  message DropAliasRequest {
63
69
  common.MsgBase base = 1;
64
- string alias = 2;
70
+ string db_name = 2;
71
+ string alias = 3;
65
72
  }
66
73
 
67
74
  message AlterAliasRequest{
68
75
  common.MsgBase base = 1;
69
- string collection_name = 2;
70
- string alias = 3;
76
+ string db_name = 2;
77
+ string collection_name = 3;
78
+ string alias = 4;
71
79
  }
72
80
 
73
81
  /**
@@ -85,6 +93,8 @@ message CreateCollectionRequest {
85
93
  // Once set, no modification is allowed (Optional)
86
94
  // https://github.com/milvus-io/milvus/issues/6690
87
95
  int32 shards_num = 5;
96
+ // The consistency level that the collection used, modification is not supported now.
97
+ common.ConsistencyLevel consistency_level = 6;
88
98
  }
89
99
 
90
100
  /**
@@ -164,6 +174,8 @@ message DescribeCollectionResponse {
164
174
  repeated string aliases = 9;
165
175
  // The message ID/posititon when collection is created
166
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;
167
179
  }
168
180
 
169
181
  /**
@@ -346,6 +358,7 @@ message GetPartitionStatisticsResponse {
346
358
  common.Status status = 1;
347
359
  repeated common.KeyValuePair stats = 2;
348
360
  }
361
+
349
362
  /*
350
363
  * List all partitions for particular collection
351
364
  */
@@ -364,13 +377,23 @@ message ShowPartitionsRequest {
364
377
  ShowType type = 6;
365
378
  }
366
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
+ */
367
384
  message ShowPartitionsResponse {
385
+ // Contain error_code and reason
368
386
  common.Status status = 1;
387
+ // All partition names for this collection
369
388
  repeated string partition_names = 2;
389
+ // All partition ids for this collection
370
390
  repeated int64 partitionIDs = 3;
371
- repeated uint64 created_timestamps = 4; // hybrid timestamps
372
- repeated uint64 created_utc_timestamps = 5; // physical timestamps
373
- repeated int64 inMemory_percentages = 6; // load percentage on querynode
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;
374
397
  }
375
398
 
376
399
  message DescribeSegmentRequest {
@@ -384,6 +407,7 @@ message DescribeSegmentResponse {
384
407
  int64 indexID = 2;
385
408
  int64 buildID = 3;
386
409
  bool enable_index = 4;
410
+ int64 fieldID = 5;
387
411
  }
388
412
 
389
413
  message ShowSegmentsRequest {
@@ -397,40 +421,77 @@ message ShowSegmentsResponse {
397
421
  repeated int64 segmentIDs = 2;
398
422
  }
399
423
 
424
+ /*
425
+ * Create index for vector datas
426
+ */
400
427
  message CreateIndexRequest {
401
- common.MsgBase base = 1; // must
428
+ // Not useful for now
429
+ common.MsgBase base = 1;
430
+ // Not useful for now
402
431
  string db_name = 2;
403
- string collection_name = 3; // must
404
- string field_name = 4; // must
405
- repeated common.KeyValuePair extra_params = 5; // must
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;
406
438
  }
407
439
 
440
+ /*
441
+ * Get created index information.
442
+ * Current release of Milvus only supports showing latest built index.
443
+ */
408
444
  message DescribeIndexRequest {
409
- common.MsgBase base = 1; // must
445
+ // Not useful for now
446
+ common.MsgBase base = 1;
447
+ // Not useful for now
410
448
  string db_name = 2;
411
- string collection_name = 3; // must
449
+ // The particular collection name in Milvus
450
+ string collection_name = 3;
451
+ // The vector field name in this particular collection
412
452
  string field_name = 4;
413
- string index_name = 5; // No need to set up for now @2021.06.30
453
+ // No need to set up for now @2021.06.30
454
+ string index_name = 5;
414
455
  }
415
456
 
457
+ /*
458
+ * Index informations
459
+ */
416
460
  message IndexDescription {
461
+ // Index name
417
462
  string index_name = 1;
463
+ // Index id
418
464
  int64 indexID = 2;
465
+ // Will return index_type, metric_type, params(like nlist).
419
466
  repeated common.KeyValuePair params = 3;
467
+ // The vector field name
420
468
  string field_name = 4;
421
469
  }
422
470
 
471
+ /*
472
+ * Describe index response
473
+ */
423
474
  message DescribeIndexResponse {
475
+ // Response status
424
476
  common.Status status = 1;
477
+ // All index informations, for now only return tha latest index you created for the collection.
425
478
  repeated IndexDescription index_descriptions = 2;
426
479
  }
427
480
 
481
+ /*
482
+ * Get index building progress
483
+ */
428
484
  message GetIndexBuildProgressRequest {
429
- common.MsgBase base = 1; // must
485
+ // Not useful for now
486
+ common.MsgBase base = 1;
487
+ // Not useful for now
430
488
  string db_name = 2 ;
431
- string collection_name = 3; // must
489
+ // The collection name in milvus
490
+ string collection_name = 3;
491
+ // The vector field name in this collection
432
492
  string field_name = 4;
433
- string index_name = 5; // must
493
+ // Not useful for now
494
+ string index_name = 5;
434
495
  }
435
496
 
436
497
  message GetIndexBuildProgressResponse {
@@ -489,6 +550,7 @@ message DeleteRequest {
489
550
  string collection_name = 3;
490
551
  string partition_name = 4;
491
552
  string expr = 5;
553
+ repeated uint32 hash_keys = 6;
492
554
  }
493
555
 
494
556
  enum PlaceholderType {
@@ -619,6 +681,8 @@ message QuerySegmentInfo {
619
681
  int64 num_rows = 5;
620
682
  string index_name = 6;
621
683
  int64 indexID = 7;
684
+ int64 nodeID = 8;
685
+ common.SegmentState state = 9;
622
686
  }
623
687
 
624
688
  message GetQuerySegmentInfoRequest {
@@ -659,6 +723,62 @@ message GetMetricsResponse {
659
723
  string component_name = 3; // metrics from which component
660
724
  }
661
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
+
662
782
  service ProxyService {
663
783
  rpc RegisterLink(RegisterLinkRequest) returns (RegisterLinkResponse) {}
664
784
  }
@@ -1,4 +1,6 @@
1
1
  export declare class Client {
2
2
  client: any;
3
3
  constructor(client: any);
4
+ checkCollectionName(data: any): void;
5
+ checkCollectionAndPartitionName(data: any): void;
4
6
  }
@@ -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,AAND,IAMC;AANY,wBAAM"}
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"}
@@ -1,5 +1,5 @@
1
- import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq } from "./types/Collection";
2
- import { BoolResponse, DescribeCollectionResponse, ResStatus, ShowCollectionsResponse, StatisticsResponse } from "./types/Response";
1
+ import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq } from "./types/Collection";
2
+ import { BoolResponse, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ResStatus, ShowCollectionsResponse, StatisticsResponse } from "./types/Response";
3
3
  import { Client } from "./Client";
4
4
  /**
5
5
  * See all [collection operation examples](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts).
@@ -11,7 +11,7 @@ export declare class Collection extends Client {
11
11
  * @param data
12
12
  * | Property | Type | Description |
13
13
  * | :---------------------- | :---- | :------------------------------- |
14
- * | createCollection | String | Collection name |
14
+ * | collection_name | String | Collection name |
15
15
  * | description | String | Collection description |
16
16
  * | fields | <a href="https://github.com/milvus-io/milvus-sdk-node/blob/main/milvus/types/Collection.ts#L8" target="_blank">FieldType</a> | Field data |
17
17
  *
@@ -239,4 +239,89 @@ export declare class Collection extends Client {
239
239
  * ```
240
240
  */
241
241
  dropCollection(data: DropCollectionReq): Promise<ResStatus>;
242
+ /**
243
+ * @ignore
244
+ * Create collection alias, then you can use alias instead of collection_name when you do vector search
245
+ * @param data
246
+ */
247
+ createAlias(data: CreateAliasReq): Promise<ResStatus>;
248
+ /**
249
+ * @ignore
250
+ * @param data
251
+ */
252
+ dropAlias(data: DropAliasReq): Promise<ResStatus>;
253
+ /**
254
+ * @ignore
255
+ * @param data
256
+ */
257
+ alterAlias(data: AlterAliasReq): Promise<ResStatus>;
258
+ /**
259
+ * Do compaction for the collection.
260
+ *
261
+ * @param data
262
+ * | Property | Type | Description |
263
+ * | :----------------- | :---- | :------------------------------- |
264
+ * | collection_name | String | The collection name to compact |
265
+ *
266
+ * @return
267
+ * | Property | Description |
268
+ * | :-------------| :-------- |
269
+ * | status | { error_code: number, reason: string }|
270
+ * | compactionID | compaction ID |
271
+ *
272
+ * #### Example
273
+ *
274
+ * ```
275
+ * new milvusClient(MILUVS_ADDRESS).collectionManager.compact({
276
+ * collection_name: 'my_collection',
277
+ * });
278
+ * ```
279
+ */
280
+ compact(data: CompactReq): Promise<CompactionResponse>;
281
+ /**
282
+ * Get compaction states of a targeted compaction id
283
+ *
284
+ * @param data
285
+ * | Property | Type | Description |
286
+ * | :----------------- | :---- | :------------------------------- |
287
+ * | compactionID | number or string | the id returned by compact |
288
+ *
289
+ * @return
290
+ * | Property | Description |
291
+ * | :-------------| :-------- |
292
+ * | status | { error_code: number, reason: string }|
293
+ * | state | the state of the compaction |
294
+ *
295
+ * #### Example
296
+ *
297
+ * ```
298
+ * new milvusClient(MILUVS_ADDRESS).collectionManager.getCompactionState({
299
+ * compactionID: compactionID,
300
+ * });
301
+ * ```
302
+ */
303
+ getCompactionState(data: GetCompactionStateReq): Promise<GetCompactionStateResponse>;
304
+ /**
305
+ * Get compaction states of a targeted compaction id
306
+ *
307
+ * @param data
308
+ * | Property | Type | Description |
309
+ * | :----------------- | :---- | :------------------------------- |
310
+ * | compactionID | number or string | the id returned by compact |
311
+ *
312
+ * @return
313
+ * | Property | Description |
314
+ * | :-------------| :-------- |
315
+ * | status | { error_code: number, reason: string }|
316
+ * | state | the state of the compaction |
317
+ *
318
+ * #### Example
319
+ *
320
+ * ```
321
+ * new milvusClient(MILUVS_ADDRESS).collectionManager.getCompactionStateWithPlans({
322
+ * compactionID: compactionID,
323
+ * });
324
+ * ```
325
+ */
326
+ getCompactionStateWithPlans(data: GetCompactionPlansReq): Promise<GetCompactionPlansResponse>;
242
327
  }