@zilliz/milvus2-sdk-node 2.2.2 → 2.2.4

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 (63) hide show
  1. package/dist/milvus/Client.d.ts +0 -8
  2. package/dist/milvus/Client.js +0 -17
  3. package/dist/milvus/Client.js.map +1 -1
  4. package/dist/milvus/Collection.d.ts +225 -131
  5. package/dist/milvus/Collection.js +262 -155
  6. package/dist/milvus/Collection.js.map +1 -1
  7. package/dist/milvus/Data.d.ts +129 -125
  8. package/dist/milvus/Data.js +157 -150
  9. package/dist/milvus/Data.js.map +1 -1
  10. package/dist/milvus/MilvusIndex.d.ts +57 -53
  11. package/dist/milvus/MilvusIndex.js +61 -55
  12. package/dist/milvus/MilvusIndex.js.map +1 -1
  13. package/dist/milvus/Partition.d.ts +86 -79
  14. package/dist/milvus/Partition.js +89 -80
  15. package/dist/milvus/Partition.js.map +1 -1
  16. package/dist/milvus/Resource.d.ts +173 -0
  17. package/dist/milvus/Resource.js +356 -0
  18. package/dist/milvus/Resource.js.map +1 -0
  19. package/dist/milvus/User.d.ts +119 -93
  20. package/dist/milvus/User.js +133 -100
  21. package/dist/milvus/User.js.map +1 -1
  22. package/dist/milvus/Utils.d.ts +1 -1
  23. package/dist/milvus/const/Milvus.d.ts +272 -0
  24. package/dist/milvus/const/Milvus.js +375 -0
  25. package/dist/milvus/const/Milvus.js.map +1 -0
  26. package/dist/milvus/index.d.ts +3 -1
  27. package/dist/milvus/index.js +8 -5
  28. package/dist/milvus/index.js.map +1 -1
  29. package/dist/milvus/types/Collection.d.ts +88 -8
  30. package/dist/milvus/types/Collection.js +1 -9
  31. package/dist/milvus/types/Collection.js.map +1 -1
  32. package/dist/milvus/types/Common.d.ts +11 -267
  33. package/dist/milvus/types/Common.js +1 -369
  34. package/dist/milvus/types/Common.js.map +1 -1
  35. package/dist/milvus/types/Data.d.ts +154 -1
  36. package/dist/milvus/types/Index.d.ts +20 -1
  37. package/dist/milvus/types/Partition.d.ts +8 -1
  38. package/dist/milvus/types/Resource.d.ts +44 -0
  39. package/dist/milvus/types/{Search.js → Resource.js} +1 -1
  40. package/dist/milvus/types/Resource.js.map +1 -0
  41. package/dist/milvus/types/Response.d.ts +0 -246
  42. package/dist/milvus/types/Response.js.map +1 -1
  43. package/dist/milvus/types/User.d.ts +53 -1
  44. package/dist/milvus/types.d.ts +8 -7
  45. package/dist/milvus/types.js +2 -1
  46. package/dist/milvus/types.js.map +1 -1
  47. package/dist/milvus/utils/Format.d.ts +12 -11
  48. package/dist/milvus/utils/Format.js +27 -18
  49. package/dist/milvus/utils/Format.js.map +1 -1
  50. package/dist/milvus/utils/Validate.d.ts +12 -0
  51. package/dist/milvus/utils/Validate.js +27 -5
  52. package/dist/milvus/utils/Validate.js.map +1 -1
  53. package/dist/proto/proto/common.proto +25 -2
  54. package/dist/proto/proto/google/protobuf/descriptor.proto +30 -0
  55. package/dist/proto/proto/milvus.proto +126 -0
  56. package/dist/proto/proto/msg.proto +107 -0
  57. package/dist/sdk.json +1 -1
  58. package/dist/utils/index.d.ts +0 -6
  59. package/dist/utils/index.js +5 -32
  60. package/dist/utils/index.js.map +1 -1
  61. package/package.json +5 -10
  62. package/dist/milvus/types/Search.d.ts +0 -81
  63. package/dist/milvus/types/Search.js.map +0 -1
@@ -68,7 +68,9 @@ enum ErrorCode {
68
68
  MemoryQuotaExhausted = 53;
69
69
  DiskQuotaExhausted = 54;
70
70
  TimeTickLongDelay = 55;
71
-
71
+ NotReadyServe = 56;
72
+ // Coord is switching from standby mode to active mode
73
+ NotReadyCoordActivating = 57;
72
74
  // Service availability.
73
75
  // NA: Not Available.
74
76
  DataCoordNA = 100;
@@ -154,7 +156,7 @@ enum MsgType {
154
156
  DropAlias = 109;
155
157
  AlterAlias = 110;
156
158
  AlterCollection = 111;
157
-
159
+ RenameCollection = 112;
158
160
 
159
161
  /* DEFINITION REQUESTS: PARTITION */
160
162
  CreatePartition = 200;
@@ -243,6 +245,14 @@ enum MsgType {
243
245
  SelectGrant = 1607;
244
246
  RefreshPolicyInfoCache = 1608;
245
247
  ListPolicy = 1609;
248
+
249
+ /* Resource group */
250
+ CreateResourceGroup = 1700;
251
+ DropResourceGroup = 1701;
252
+ ListResourceGroups = 1702;
253
+ DescribeResourceGroup = 1703;
254
+ TransferNode = 1704;
255
+ TransferReplica = 1705;
246
256
  }
247
257
 
248
258
  message MsgBase {
@@ -327,6 +337,14 @@ enum ObjectPrivilege {
327
337
  PrivilegeManageOwnership = 23;
328
338
  PrivilegeSelectUser = 24;
329
339
  PrivilegeUpsert = 25;
340
+ PrivilegeCreateResourceGroup = 26;
341
+ PrivilegeDropResourceGroup = 27;
342
+ PrivilegeDescribeResourceGroup = 28;
343
+ PrivilegeListResourceGroups = 29;
344
+ PrivilegeTransferNode = 30;
345
+ PrivilegeTransferReplica = 31;
346
+ PrivilegeGetLoadingProgress = 32;
347
+ PrivilegeGetLoadState = 33;
330
348
  }
331
349
 
332
350
  message PrivilegeExt {
@@ -354,3 +372,8 @@ enum LoadState {
354
372
  LoadStateLoading = 2;
355
373
  LoadStateLoaded = 3;
356
374
  }
375
+
376
+ message SegmentStats {
377
+ int64 SegmentID = 1;
378
+ int64 NumRows = 2;
379
+ }
@@ -631,6 +631,36 @@ message FieldOptions {
631
631
  // formats, e.g. when the field contains sensitive credentials.
632
632
  optional bool debug_redact = 16 [default = false];
633
633
 
634
+ // If set to RETENTION_SOURCE, the option will be omitted from the binary.
635
+ // Note: as of January 2023, support for this is in progress and does not yet
636
+ // have an effect (b/264593489).
637
+ enum OptionRetention {
638
+ RETENTION_UNKNOWN = 0;
639
+ RETENTION_RUNTIME = 1;
640
+ RETENTION_SOURCE = 2;
641
+ }
642
+
643
+ optional OptionRetention retention = 17;
644
+
645
+ // This indicates the types of entities that the field may apply to when used
646
+ // as an option. If it is unset, then the field may be freely used as an
647
+ // option on any kind of entity. Note: as of January 2023, support for this is
648
+ // in progress and does not yet have an effect (b/264593489).
649
+ enum OptionTargetType {
650
+ TARGET_TYPE_UNKNOWN = 0;
651
+ TARGET_TYPE_FILE = 1;
652
+ TARGET_TYPE_EXTENSION_RANGE = 2;
653
+ TARGET_TYPE_MESSAGE = 3;
654
+ TARGET_TYPE_FIELD = 4;
655
+ TARGET_TYPE_ONEOF = 5;
656
+ TARGET_TYPE_ENUM = 6;
657
+ TARGET_TYPE_ENUM_ENTRY = 7;
658
+ TARGET_TYPE_SERVICE = 8;
659
+ TARGET_TYPE_METHOD = 9;
660
+ }
661
+
662
+ optional OptionTargetType target = 18;
663
+
634
664
  // The parser stores options it doesn't recognize here. See above.
635
665
  repeated UninterpretedOption uninterpreted_option = 999;
636
666
 
@@ -97,6 +97,15 @@ service MilvusService {
97
97
 
98
98
  rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
99
99
  rpc CheckHealth(CheckHealthRequest) returns (CheckHealthResponse) {}
100
+
101
+ rpc CreateResourceGroup(CreateResourceGroupRequest) returns (common.Status) {}
102
+ rpc DropResourceGroup(DropResourceGroupRequest) returns (common.Status) {}
103
+ rpc TransferNode(TransferNodeRequest) returns (common.Status) {}
104
+ rpc TransferReplica(TransferReplicaRequest) returns (common.Status) {}
105
+ rpc ListResourceGroups(ListResourceGroupsRequest) returns (ListResourceGroupsResponse) {}
106
+ rpc DescribeResourceGroup(DescribeResourceGroupRequest) returns (DescribeResourceGroupResponse) {}
107
+
108
+ rpc RenameCollection(RenameCollectionRequest) returns (common.Status) {}
100
109
  }
101
110
 
102
111
  message CreateAliasRequest {
@@ -274,6 +283,10 @@ message LoadCollectionRequest {
274
283
  string collection_name = 3;
275
284
  // The replica number to load, default by 1
276
285
  int32 replica_number = 4;
286
+ // create replica used resource group
287
+ repeated string resource_groups = 5;
288
+ // Whether to enable refresh mode.
289
+ bool refresh = 6;
277
290
  }
278
291
 
279
292
  /**
@@ -464,6 +477,10 @@ message LoadPartitionsRequest {
464
477
  repeated string partition_names = 4;
465
478
  // The replicas number you would load, 1 by default
466
479
  int32 replica_number = 5;
480
+ // create replica used resource group
481
+ repeated string resource_groups = 6;
482
+ // Whether to enable refresh mode.
483
+ bool refresh = 7;
467
484
  }
468
485
 
469
486
  /*
@@ -1065,6 +1082,7 @@ message GetReplicasRequest {
1065
1082
  common.MsgBase base = 1;
1066
1083
  int64 collectionID = 2;
1067
1084
  bool with_shard_nodes = 3;
1085
+ string collection_name = 4;
1068
1086
  }
1069
1087
 
1070
1088
  message GetReplicasResponse {
@@ -1078,6 +1096,9 @@ message ReplicaInfo { // ReplicaGroup
1078
1096
  repeated int64 partition_ids = 3; // empty indicates to load collection
1079
1097
  repeated ShardReplica shard_replicas = 4;
1080
1098
  repeated int64 node_ids = 5; // include leaders
1099
+ string resource_group_name = 6;
1100
+ // outbound access rg -> node num
1101
+ map<string, int32> num_outbound_node = 7;
1081
1102
  }
1082
1103
 
1083
1104
  message ShardReplica {
@@ -1335,6 +1356,11 @@ message OperatePrivilegeRequest {
1335
1356
  }
1336
1357
 
1337
1358
  message GetLoadingProgressRequest {
1359
+ option (common.privilege_ext_obj) = {
1360
+ object_type: Collection
1361
+ object_privilege: PrivilegeGetLoadingProgress
1362
+ object_name_index: 2
1363
+ };
1338
1364
  // Not useful for now
1339
1365
  common.MsgBase base = 1;
1340
1366
  string collection_name = 2;
@@ -1347,6 +1373,11 @@ message GetLoadingProgressResponse {
1347
1373
  }
1348
1374
 
1349
1375
  message GetLoadStateRequest {
1376
+ option (common.privilege_ext_obj) = {
1377
+ object_type: Collection
1378
+ object_privilege: PrivilegeGetLoadState
1379
+ object_name_index: 2
1380
+ };
1350
1381
  // Not useful for now
1351
1382
  common.MsgBase base = 1;
1352
1383
  string collection_name = 2;
@@ -1391,3 +1422,98 @@ message CheckHealthResponse {
1391
1422
  repeated string reasons = 3;
1392
1423
  repeated QuotaState quota_states = 4;
1393
1424
  }
1425
+
1426
+ message CreateResourceGroupRequest {
1427
+ option (common.privilege_ext_obj) = {
1428
+ object_type: Global
1429
+ object_privilege: PrivilegeCreateResourceGroup
1430
+ object_name_index: -1
1431
+ };
1432
+ common.MsgBase base = 1;
1433
+ string resource_group = 2;
1434
+ }
1435
+
1436
+ message DropResourceGroupRequest {
1437
+ option (common.privilege_ext_obj) = {
1438
+ object_type: Global
1439
+ object_privilege: PrivilegeDropResourceGroup
1440
+ object_name_index: -1
1441
+ };
1442
+ common.MsgBase base = 1;
1443
+ string resource_group = 2;
1444
+ }
1445
+
1446
+ // transfer `nodeNum` nodes from `source_resource_group` to `target_resource_group`
1447
+ message TransferNodeRequest {
1448
+ option (common.privilege_ext_obj) = {
1449
+ object_type: Global
1450
+ object_privilege: PrivilegeTransferNode
1451
+ object_name_index: -1
1452
+ };
1453
+ common.MsgBase base = 1;
1454
+ string source_resource_group = 2;
1455
+ string target_resource_group = 3;
1456
+ int32 num_node = 4;
1457
+ }
1458
+
1459
+ // transfer `replicaNum` replicas in `collectionID` from `source_resource_group` to `target_resource_group`
1460
+ message TransferReplicaRequest {
1461
+ option (common.privilege_ext_obj) = {
1462
+ object_type: Global
1463
+ object_privilege: PrivilegeTransferReplica
1464
+ object_name_index: -1
1465
+ };
1466
+ common.MsgBase base = 1;
1467
+ string source_resource_group = 2;
1468
+ string target_resource_group = 3;
1469
+ string collection_name = 4;
1470
+ int64 num_replica = 5;
1471
+ }
1472
+
1473
+ message ListResourceGroupsRequest {
1474
+ option (common.privilege_ext_obj) = {
1475
+ object_type: Global
1476
+ object_privilege: PrivilegeListResourceGroups
1477
+ object_name_index: -1
1478
+ };
1479
+ common.MsgBase base = 1;
1480
+ }
1481
+
1482
+ message ListResourceGroupsResponse {
1483
+ common.Status status = 1;
1484
+ repeated string resource_groups = 2;
1485
+ }
1486
+
1487
+ message DescribeResourceGroupRequest {
1488
+ option (common.privilege_ext_obj) = {
1489
+ object_type: Global
1490
+ object_privilege: PrivilegeDescribeResourceGroup
1491
+ object_name_index: -1
1492
+ };
1493
+ common.MsgBase base = 1;
1494
+ string resource_group = 2;
1495
+ }
1496
+
1497
+ message DescribeResourceGroupResponse {
1498
+ common.Status status = 1;
1499
+ ResourceGroup resource_group = 2;
1500
+ }
1501
+
1502
+ message ResourceGroup {
1503
+ string name = 1;
1504
+ int32 capacity = 2;
1505
+ int32 num_available_node = 3;
1506
+ // collection name -> loaded replica num
1507
+ map<string, int32> num_loaded_replica = 4;
1508
+ // collection name -> accessed other rg's node num
1509
+ map<string, int32> num_outgoing_node = 5;
1510
+ // collection name -> be accessed node num by other rg
1511
+ map<string, int32> num_incoming_node = 6;
1512
+ }
1513
+
1514
+ message RenameCollectionRequest {
1515
+ common.MsgBase base = 1;
1516
+ string db = 2;
1517
+ string oldName = 3;
1518
+ string newName = 4;
1519
+ }
@@ -0,0 +1,107 @@
1
+ syntax = "proto3";
2
+ package milvus.proto.msg;
3
+ option go_package = "github.com/milvus-io/milvus-proto/go-api/msgpb";
4
+
5
+ import "common.proto";
6
+ import "schema.proto";
7
+
8
+ enum InsertDataVersion {
9
+ // 0 must refer to row-based format, since it's the first version in Milvus.
10
+ RowBased = 0;
11
+ ColumnBased = 1;
12
+ }
13
+
14
+ message InsertRequest {
15
+ common.MsgBase base = 1;
16
+ string shardName = 2;
17
+ string db_name = 3;
18
+ string collection_name = 4;
19
+ string partition_name = 5;
20
+ int64 dbID = 6;
21
+ int64 collectionID = 7;
22
+ int64 partitionID = 8;
23
+ int64 segmentID = 9;
24
+ repeated uint64 timestamps = 10;
25
+ repeated int64 rowIDs = 11;
26
+ // row_data was reserved for compatibility
27
+ repeated common.Blob row_data = 12;
28
+ repeated schema.FieldData fields_data = 13;
29
+ uint64 num_rows = 14;
30
+ InsertDataVersion version = 15;
31
+ }
32
+
33
+ message DeleteRequest {
34
+ common.MsgBase base = 1;
35
+ string shardName = 2;
36
+ string db_name = 3;
37
+ string collection_name = 4;
38
+ string partition_name = 5;
39
+ int64 dbID = 6;
40
+ int64 collectionID = 7;
41
+ int64 partitionID = 8;
42
+ repeated int64 int64_primary_keys = 9; // deprecated
43
+ repeated uint64 timestamps = 10;
44
+ int64 num_rows = 11;
45
+ schema.IDs primary_keys = 12;
46
+ }
47
+
48
+ message MsgPosition {
49
+ string channel_name = 1;
50
+ bytes msgID = 2;
51
+ string msgGroup = 3;
52
+ uint64 timestamp = 4;
53
+ }
54
+
55
+ message CreateCollectionRequest {
56
+ common.MsgBase base = 1;
57
+ string db_name = 2;
58
+ string collectionName = 3;
59
+ string partitionName = 4;
60
+ // `schema` is the serialized `schema.CollectionSchema`
61
+ int64 dbID = 5;
62
+ int64 collectionID = 6;
63
+ int64 partitionID = 7;
64
+ bytes schema = 8;
65
+ repeated string virtualChannelNames = 9;
66
+ repeated string physicalChannelNames = 10;
67
+ }
68
+
69
+ message DropCollectionRequest {
70
+ common.MsgBase base = 1;
71
+ string db_name = 2;
72
+ string collectionName = 3;
73
+ int64 dbID = 4;
74
+ int64 collectionID = 5;
75
+ }
76
+
77
+ message CreatePartitionRequest {
78
+ common.MsgBase base = 1;
79
+ string db_name = 2;
80
+ string collection_name = 3;
81
+ string partition_name = 4;
82
+ int64 dbID = 5;
83
+ int64 collectionID = 6;
84
+ int64 partitionID = 7;
85
+ }
86
+
87
+ message DropPartitionRequest {
88
+ common.MsgBase base = 1;
89
+ string db_name = 2;
90
+ string collection_name = 3;
91
+ string partition_name = 4;
92
+ int64 dbID = 5;
93
+ int64 collectionID = 6;
94
+ int64 partitionID = 7;
95
+ }
96
+
97
+ message TimeTickMsg {
98
+ common.MsgBase base = 1;
99
+ }
100
+
101
+ message DataNodeTtMsg {
102
+ common.MsgBase base =1;
103
+ string channel_name = 2;
104
+ uint64 timestamp = 3;
105
+ repeated common.SegmentStats segments_stats = 4;
106
+ }
107
+
package/dist/sdk.json CHANGED
@@ -1 +1 @@
1
- {"version":"2.2.2","milvusVersion":"v2.2.1"}
1
+ {"version":"2.2.4","milvusVersion":"2.2.0-latest"}
@@ -1,7 +1 @@
1
1
  export declare function promisify(obj: any, target: string, params: any, timeout?: number): Promise<any>;
2
- export declare function generateInsertData(fields: {
3
- isVector: boolean;
4
- dim?: number;
5
- name: string;
6
- isBool?: boolean;
7
- }[], count: number): any[];
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.generateInsertData = exports.promisify = void 0;
3
+ exports.promisify = void 0;
4
+ var Milvus_1 = require("../milvus/const/Milvus");
13
5
  function promisify(obj, target, params, timeout) {
14
- var deadline = timeout ? new Date(Date.now() + timeout) : timeout;
6
+ var deadline = timeout
7
+ ? new Date(Date.now() + timeout)
8
+ : new Date(Date.now() + Milvus_1.DEFAULT_CONNECT_TIMEOUT);
15
9
  var res = new Promise(function (resolve, reject) {
16
10
  try {
17
11
  obj[target](params, { deadline: deadline }, function (err, result) {
@@ -30,25 +24,4 @@ function promisify(obj, target, params, timeout) {
30
24
  return res;
31
25
  }
32
26
  exports.promisify = promisify;
33
- function generateInsertData(fields, count) {
34
- var results = [];
35
- var _loop_1 = function () {
36
- var value = {};
37
- fields.forEach(function (v) {
38
- var isVector = v.isVector, dim = v.dim, name = v.name, isBool = v.isBool;
39
- value[name] = isVector
40
- ? __spreadArray([], Array(dim), true).map(function () { return Math.random() * 10; })
41
- : isBool
42
- ? count % 2 === 0
43
- : Math.floor(Math.random() * 100000);
44
- });
45
- results.push(value);
46
- count--;
47
- };
48
- while (count > 0) {
49
- _loop_1();
50
- }
51
- return results;
52
- }
53
- exports.generateInsertData = generateInsertData;
54
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,SAAgB,SAAS,CACvB,GAAQ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AA1BD,8BA0BC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@zilliz/milvus2-sdk-node",
3
3
  "author": "ued@zilliz.com",
4
- "version": "2.2.2",
5
- "milvusVersion": "v2.2.1",
4
+ "version": "2.2.4",
5
+ "milvusVersion": "2.2.0-latest",
6
6
  "main": "dist/milvus",
7
7
  "files": [
8
8
  "dist"
@@ -15,16 +15,12 @@
15
15
  "coverage": "jest --coverage=true --config jest.config.js --no-cache --testPathIgnorePatterns=/test/build/ test/User.spec.ts ",
16
16
  "build-test": "yarn build && jest test/build/Collection.spec.ts",
17
17
  "example": "npx ts-node",
18
- "doc": "rm -rf docs && npx typedoc && node doc",
18
+ "doc": "rm -rf docs && npx typedoc",
19
19
  "doc-json": "npx typedoc milvus --json"
20
20
  },
21
21
  "dependencies": {
22
22
  "@grpc/grpc-js": "^1.2.12",
23
23
  "@grpc/proto-loader": "^0.7.3",
24
- "@microsoft/api-documenter": "^7.13.39",
25
- "@microsoft/api-extractor": "^7.18.5",
26
- "json-schema": "^0.4.0",
27
- "node-forge": "^1.0.0",
28
24
  "protobufjs": "^7.1.2"
29
25
  },
30
26
  "devDependencies": {
@@ -33,9 +29,8 @@
33
29
  "jest": "^29.2.1",
34
30
  "ts-jest": "^29.0.3",
35
31
  "ts-node": "^10.9.1",
36
- "typedoc": "^0.23.17",
37
- "typedoc-neo-theme": "^1.1.0",
38
- "typescript": "^4.2.4"
32
+ "typedoc": "^0.23.26",
33
+ "typescript": "^4.9.5"
39
34
  },
40
35
  "publishConfig": {
41
36
  "access": "public"
@@ -1,81 +0,0 @@
1
- /// <reference types="node" />
2
- import { DataType, GrpcTimeOut } from './Common';
3
- import { ResStatus } from './Response';
4
- export interface SearchParam {
5
- anns_field: string;
6
- topk: string;
7
- metric_type: string;
8
- params: string;
9
- round_decimal?: number;
10
- }
11
- export interface SearchReq extends GrpcTimeOut {
12
- collection_name: string;
13
- partition_names?: string[];
14
- expr?: string;
15
- search_params: SearchParam;
16
- vectors: number[][];
17
- output_fields?: string[];
18
- travel_timestamp?: string;
19
- vector_type: DataType.BinaryVector | DataType.FloatVector;
20
- nq?: number;
21
- }
22
- export interface SearchRes {
23
- status: ResStatus;
24
- results: {
25
- top_k: number;
26
- fields_data: {
27
- type: string;
28
- field_name: string;
29
- field: 'scalars';
30
- scalars: {
31
- [x: string]: any;
32
- };
33
- }[];
34
- scores: number[];
35
- ids: {
36
- int_id?: {
37
- data: number[];
38
- };
39
- str_id?: {
40
- data: string[];
41
- };
42
- id_field: 'int_id' | 'str_id';
43
- };
44
- num_queries: number;
45
- topks: number[];
46
- };
47
- }
48
- export interface QueryReq extends GrpcTimeOut {
49
- collection_name: string;
50
- expr: string;
51
- output_fields?: string[];
52
- partition_names?: string[];
53
- offset?: number;
54
- limit?: number;
55
- }
56
- export interface QueryRes {
57
- status: ResStatus;
58
- fields_data: {
59
- type: DataType;
60
- field_name: string;
61
- field: 'vectors' | 'scalars';
62
- field_id: number;
63
- vectors?: {
64
- dim: string;
65
- data: 'float_vector' | 'binary_vector';
66
- float_vector?: {
67
- data: number[];
68
- };
69
- binary_vector?: Buffer;
70
- };
71
- scalars?: {
72
- [x: string]: any;
73
- data: string;
74
- };
75
- }[];
76
- }
77
- export interface GetMetricsRequest extends GrpcTimeOut {
78
- request: {
79
- metric_type: 'system_info' | 'system_statistics' | 'system_log';
80
- };
81
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../milvus/types/Search.ts"],"names":[],"mappings":""}