@zilliz/milvus2-sdk-node 2.3.5 → 2.4.1

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 (121) hide show
  1. package/README.md +154 -35
  2. package/dist/milvus/HttpClient.d.ts +165 -2
  3. package/dist/milvus/HttpClient.js +17 -3
  4. package/dist/milvus/HttpClient.js.map +1 -1
  5. package/dist/milvus/MilvusClient.d.ts +3 -3
  6. package/dist/milvus/MilvusClient.js +42 -8
  7. package/dist/milvus/MilvusClient.js.map +1 -1
  8. package/dist/milvus/const/client.d.ts +4 -3
  9. package/dist/milvus/const/client.js +4 -3
  10. package/dist/milvus/const/client.js.map +1 -1
  11. package/dist/milvus/const/defaults.d.ts +5 -4
  12. package/dist/milvus/const/defaults.js +14 -13
  13. package/dist/milvus/const/defaults.js.map +1 -1
  14. package/dist/milvus/const/error.js +1 -1
  15. package/dist/milvus/const/error.js.map +1 -1
  16. package/dist/milvus/const/milvus.d.ts +47 -8
  17. package/dist/milvus/const/milvus.js +42 -3
  18. package/dist/milvus/const/milvus.js.map +1 -1
  19. package/dist/milvus/grpc/BaseClient.d.ts +11 -9
  20. package/dist/milvus/grpc/BaseClient.js +59 -21
  21. package/dist/milvus/grpc/BaseClient.js.map +1 -1
  22. package/dist/milvus/grpc/Collection.d.ts +311 -366
  23. package/dist/milvus/grpc/Collection.js +355 -387
  24. package/dist/milvus/grpc/Collection.js.map +1 -1
  25. package/dist/milvus/grpc/Data.d.ts +244 -291
  26. package/dist/milvus/grpc/Data.js +402 -539
  27. package/dist/milvus/grpc/Data.js.map +1 -1
  28. package/dist/milvus/grpc/Database.d.ts +29 -41
  29. package/dist/milvus/grpc/Database.js +32 -44
  30. package/dist/milvus/grpc/Database.js.map +1 -1
  31. package/dist/milvus/grpc/GrpcClient.d.ts +34 -13
  32. package/dist/milvus/grpc/GrpcClient.js +80 -70
  33. package/dist/milvus/grpc/GrpcClient.js.map +1 -1
  34. package/dist/milvus/grpc/MilvusIndex.d.ts +127 -67
  35. package/dist/milvus/grpc/MilvusIndex.js +166 -70
  36. package/dist/milvus/grpc/MilvusIndex.js.map +1 -1
  37. package/dist/milvus/grpc/Partition.d.ts +78 -113
  38. package/dist/milvus/grpc/Partition.js +109 -119
  39. package/dist/milvus/grpc/Partition.js.map +1 -1
  40. package/dist/milvus/grpc/Resource.d.ts +63 -92
  41. package/dist/milvus/grpc/Resource.js +69 -98
  42. package/dist/milvus/grpc/Resource.js.map +1 -1
  43. package/dist/milvus/grpc/User.d.ts +263 -295
  44. package/dist/milvus/grpc/User.js +287 -310
  45. package/dist/milvus/grpc/User.js.map +1 -1
  46. package/dist/milvus/http/Alias.d.ts +37 -0
  47. package/dist/milvus/http/Alias.js +62 -0
  48. package/dist/milvus/http/Alias.js.map +1 -0
  49. package/dist/milvus/http/Collection.d.ts +15 -1
  50. package/dist/milvus/http/Collection.js +55 -9
  51. package/dist/milvus/http/Collection.js.map +1 -1
  52. package/dist/milvus/http/Import.d.ts +33 -0
  53. package/dist/milvus/http/Import.js +48 -0
  54. package/dist/milvus/http/Import.js.map +1 -0
  55. package/dist/milvus/http/MilvusIndex.d.ts +35 -0
  56. package/dist/milvus/http/MilvusIndex.js +55 -0
  57. package/dist/milvus/http/MilvusIndex.js.map +1 -0
  58. package/dist/milvus/http/Partition.d.ts +41 -0
  59. package/dist/milvus/http/Partition.js +76 -0
  60. package/dist/milvus/http/Partition.js.map +1 -0
  61. package/dist/milvus/http/Role.d.ts +39 -0
  62. package/dist/milvus/http/Role.js +69 -0
  63. package/dist/milvus/http/Role.js.map +1 -0
  64. package/dist/milvus/http/User.d.ts +41 -0
  65. package/dist/milvus/http/User.js +76 -0
  66. package/dist/milvus/http/User.js.map +1 -0
  67. package/dist/milvus/http/Vector.d.ts +5 -3
  68. package/dist/milvus/http/Vector.js +10 -7
  69. package/dist/milvus/http/Vector.js.map +1 -1
  70. package/dist/milvus/http/index.d.ts +6 -0
  71. package/dist/milvus/http/index.js +6 -0
  72. package/dist/milvus/http/index.js.map +1 -1
  73. package/dist/milvus/index.d.ts +0 -1
  74. package/dist/milvus/index.js +0 -1
  75. package/dist/milvus/index.js.map +1 -1
  76. package/dist/milvus/types/Client.d.ts +5 -0
  77. package/dist/milvus/types/Collection.d.ts +34 -9
  78. package/dist/milvus/types/Common.d.ts +1 -3
  79. package/dist/milvus/types/Data.d.ts +79 -23
  80. package/dist/milvus/types/Data.js +1 -0
  81. package/dist/milvus/types/Data.js.map +1 -1
  82. package/dist/milvus/types/HighLevel.d.ts +6 -3
  83. package/dist/milvus/types/Http.d.ts +191 -9
  84. package/dist/milvus/types/MilvusIndex.d.ts +17 -3
  85. package/dist/milvus/utils/Bytes.d.ts +84 -0
  86. package/dist/milvus/utils/Bytes.js +261 -0
  87. package/dist/milvus/utils/Bytes.js.map +1 -0
  88. package/dist/milvus/utils/Format.d.ts +126 -68
  89. package/dist/milvus/utils/Format.js +375 -94
  90. package/dist/milvus/utils/Format.js.map +1 -1
  91. package/dist/milvus/utils/Function.d.ts +4 -2
  92. package/dist/milvus/utils/Function.js +58 -25
  93. package/dist/milvus/utils/Function.js.map +1 -1
  94. package/dist/milvus/utils/Grpc.d.ts +3 -2
  95. package/dist/milvus/utils/Grpc.js +65 -98
  96. package/dist/milvus/utils/Grpc.js.map +1 -1
  97. package/dist/milvus/utils/Validate.d.ts +18 -3
  98. package/dist/milvus/utils/Validate.js +38 -12
  99. package/dist/milvus/utils/Validate.js.map +1 -1
  100. package/dist/milvus/utils/index.d.ts +1 -1
  101. package/dist/milvus/utils/index.js +1 -1
  102. package/dist/milvus/utils/index.js.map +1 -1
  103. package/dist/proto/proto/common.proto +26 -1
  104. package/dist/proto/proto/google/protobuf/descriptor.proto +90 -28
  105. package/dist/proto/proto/milvus.proto +168 -2
  106. package/dist/proto/proto/rg.proto +28 -0
  107. package/dist/proto/proto/schema.proto +34 -0
  108. package/dist/sdk.json +1 -1
  109. package/package.json +8 -5
  110. package/dist/milvus/OrmClient.d.ts +0 -19
  111. package/dist/milvus/OrmClient.js +0 -51
  112. package/dist/milvus/OrmClient.js.map +0 -1
  113. package/dist/milvus/orm/Collection.d.ts +0 -43
  114. package/dist/milvus/orm/Collection.js +0 -165
  115. package/dist/milvus/orm/Collection.js.map +0 -1
  116. package/dist/milvus/orm/index.d.ts +0 -1
  117. package/dist/milvus/orm/index.js +0 -18
  118. package/dist/milvus/orm/index.js.map +0 -1
  119. package/dist/milvus/utils/Blob.d.ts +0 -4
  120. package/dist/milvus/utils/Blob.js +0 -18
  121. package/dist/milvus/utils/Blob.js.map +0 -1
@@ -108,6 +108,7 @@ message Status {
108
108
  int32 code = 3;
109
109
  bool retriable = 4;
110
110
  string detail = 5;
111
+ map<string, string> extra_info = 6;
111
112
  }
112
113
 
113
114
  message KeyValuePair {
@@ -130,6 +131,7 @@ enum PlaceholderType {
130
131
  FloatVector = 101;
131
132
  Float16Vector = 102;
132
133
  BFloat16Vector = 103;
134
+ SparseFloatVector = 104;
133
135
  Int64 = 5;
134
136
  VarChar = 21;
135
137
  }
@@ -137,7 +139,9 @@ enum PlaceholderType {
137
139
  message PlaceholderValue {
138
140
  string tag = 1;
139
141
  PlaceholderType type = 2;
140
- // values is a 2d-array, every array contains a vector
142
+ // values is a 2d-array of nq rows, every row contains a query vector.
143
+ // for dense vector, all rows are of the same length; for sparse vector,
144
+ // the length of each row may vary depending on their number of non-zeros.
141
145
  repeated bytes values = 3;
142
146
  }
143
147
 
@@ -195,6 +199,7 @@ enum MsgType {
195
199
  DescribeIndex = 301;
196
200
  DropIndex = 302;
197
201
  GetIndexStatistics = 303;
202
+ AlterIndex = 304;
198
203
 
199
204
  /* MANIPULATION REQUESTS */
200
205
  Insert = 400;
@@ -271,6 +276,7 @@ enum MsgType {
271
276
  DescribeResourceGroup = 1703;
272
277
  TransferNode = 1704;
273
278
  TransferReplica = 1705;
279
+ UpdateResourceGroups = 1706;
274
280
 
275
281
  /* Database group */
276
282
  CreateDatabase = 1801;
@@ -381,6 +387,18 @@ enum ObjectPrivilege {
381
387
  PrivilegeDropDatabase = 36;
382
388
  PrivilegeListDatabases = 37;
383
389
  PrivilegeFlushAll = 38;
390
+
391
+ PrivilegeCreatePartition = 39;
392
+ PrivilegeDropPartition = 40;
393
+ PrivilegeShowPartitions = 41;
394
+ PrivilegeHasPartition = 42;
395
+ PrivilegeGetFlushState = 43;
396
+ PrivilegeCreateAlias = 44;
397
+ PrivilegeDropAlias = 45;
398
+ PrivilegeDescribeAlias = 46;
399
+ PrivilegeListAliases = 47;
400
+
401
+ PrivilegeUpdateResourceGroups = 48;
384
402
  }
385
403
 
386
404
  message PrivilegeExt {
@@ -435,3 +453,10 @@ message ServerInfo {
435
453
  // reserved for newly-added feature if necessary.
436
454
  map<string, string> reserved = 6;
437
455
  }
456
+
457
+ // NodeInfo is used to describe the node information.
458
+ message NodeInfo {
459
+ int64 node_id = 1;
460
+ string address = 2;
461
+ string hostname = 3;
462
+ }
@@ -62,6 +62,10 @@ enum Edition {
62
62
  // A placeholder for an unknown edition value.
63
63
  EDITION_UNKNOWN = 0;
64
64
 
65
+ // A placeholder edition for specifying default behaviors *before* a feature
66
+ // was first introduced. This is effectively an "infinite past".
67
+ EDITION_LEGACY = 900;
68
+
65
69
  // Legacy syntax "editions". These pre-date editions, but behave much like
66
70
  // distinct editions. These can't be used to specify the edition of proto
67
71
  // files, but feature definitions must supply proto2/proto3 defaults for
@@ -73,6 +77,7 @@ enum Edition {
73
77
  // should not be depended on, but they will always be time-ordered for easy
74
78
  // comparison.
75
79
  EDITION_2023 = 1000;
80
+ EDITION_2024 = 1001;
76
81
 
77
82
  // Placeholder editions for testing feature resolution. These should not be
78
83
  // used or relyed on outside of tests.
@@ -81,6 +86,11 @@ enum Edition {
81
86
  EDITION_99997_TEST_ONLY = 99997;
82
87
  EDITION_99998_TEST_ONLY = 99998;
83
88
  EDITION_99999_TEST_ONLY = 99999;
89
+
90
+ // Placeholder for specifying unbounded edition support. This should only
91
+ // ever be used by plugins that can expect to never require any changes to
92
+ // support a new edition.
93
+ EDITION_MAX = 0x7FFFFFFF;
84
94
  }
85
95
 
86
96
  // Describes a complete .proto file.
@@ -202,7 +212,8 @@ message ExtensionRangeOptions {
202
212
  // The verification state of the range.
203
213
  // TODO: flip the default to DECLARATION once all empty ranges
204
214
  // are marked as UNVERIFIED.
205
- optional VerificationState verification = 3 [default = UNVERIFIED];
215
+ optional VerificationState verification = 3
216
+ [default = UNVERIFIED, retention = RETENTION_SOURCE];
206
217
 
207
218
  // Clients can define custom options in extensions of this message. See above.
208
219
  extensions 1000 to max;
@@ -441,12 +452,16 @@ message FileOptions {
441
452
  // This option does nothing.
442
453
  optional bool java_generate_equals_and_hash = 20 [deprecated=true];
443
454
 
444
- // If set true, then the Java2 code generator will generate code that
445
- // throws an exception whenever an attempt is made to assign a non-UTF-8
446
- // byte sequence to a string field.
447
- // Message reflection will do the same.
448
- // However, an extension field still accepts non-UTF-8 byte sequences.
449
- // This option has no effect on when used with the lite runtime.
455
+ // A proto2 file can set this to true to opt in to UTF-8 checking for Java,
456
+ // which will throw an exception if invalid UTF-8 is parsed from the wire or
457
+ // assigned to a string field.
458
+ //
459
+ // TODO: clarify exactly what kinds of field types this option
460
+ // applies to, and update these docs accordingly.
461
+ //
462
+ // Proto3 files already perform these checks. Setting the option explicitly to
463
+ // false has no effect: it cannot be used to opt proto3 files out of UTF-8
464
+ // checks.
450
465
  optional bool java_string_check_utf8 = 27 [default = false];
451
466
 
452
467
  // Generated classes can be optimized for speed or code size.
@@ -478,7 +493,7 @@ message FileOptions {
478
493
  optional bool cc_generic_services = 16 [default = false];
479
494
  optional bool java_generic_services = 17 [default = false];
480
495
  optional bool py_generic_services = 18 [default = false];
481
- optional bool php_generic_services = 42 [default = false];
496
+ reserved 42; // removed php_generic_services
482
497
 
483
498
  // Is this file deprecated?
484
499
  // Depending on the target platform, this can emit Deprecated annotations
@@ -570,10 +585,6 @@ message MessageOptions {
570
585
 
571
586
  reserved 4, 5, 6;
572
587
 
573
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
574
- // instead. The option should only be implicitly set by the proto compiler
575
- // parser.
576
- //
577
588
  // Whether the message is an automatically generated map entry type for the
578
589
  // maps field.
579
590
  //
@@ -591,6 +602,10 @@ message MessageOptions {
591
602
  // use a native map in the target language to hold the keys and values.
592
603
  // The reflection APIs in such implementations still need to work as
593
604
  // if the field is a repeated message field.
605
+ //
606
+ // NOTE: Do not set the option in .proto files. Always use the maps syntax
607
+ // instead. The option should only be implicitly set by the proto compiler
608
+ // parser.
594
609
  optional bool map_entry = 7;
595
610
 
596
611
  reserved 8; // javalite_serializable
@@ -689,19 +704,11 @@ message FieldOptions {
689
704
  // call from multiple threads concurrently, while non-const methods continue
690
705
  // to require exclusive access.
691
706
  //
692
- // Note that implementations may choose not to check required fields within
693
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
694
- // may return true even if the inner message has missing required fields.
695
- // This is necessary because otherwise the inner message would have to be
696
- // parsed in order to perform the check, defeating the purpose of lazy
697
- // parsing. An implementation which chooses not to check required fields
698
- // must be consistent about it. That is, for any particular sub-message, the
699
- // implementation must either *always* check its required fields, or *never*
700
- // check its required fields, regardless of whether or not the message has
701
- // been parsed.
702
- //
703
- // As of May 2022, lazy verifies the contents of the byte stream during
704
- // parsing. An invalid byte stream will cause the overall parsing to fail.
707
+ // Note that lazy message fields are still eagerly verified to check
708
+ // ill-formed wireformat or missing required fields. Calling IsInitialized()
709
+ // on the outer message would fail if the inner message has missing required
710
+ // fields. Failed verification would result in parsing failure (except when
711
+ // uninitialized messages are acceptable).
705
712
  optional bool lazy = 5 [default = false];
706
713
 
707
714
  // unverified_lazy does no correctness checks on the byte stream. This should
@@ -761,6 +768,28 @@ message FieldOptions {
761
768
  // Any features defined in the specific edition.
762
769
  optional FeatureSet features = 21;
763
770
 
771
+ // Information about the support window of a feature.
772
+ message FeatureSupport {
773
+ // The edition that this feature was first available in. In editions
774
+ // earlier than this one, the default assigned to EDITION_LEGACY will be
775
+ // used, and proto files will not be able to override it.
776
+ optional Edition edition_introduced = 1;
777
+
778
+ // The edition this feature becomes deprecated in. Using this after this
779
+ // edition may trigger warnings.
780
+ optional Edition edition_deprecated = 2;
781
+
782
+ // The deprecation warning text if this feature is used after the edition it
783
+ // was marked deprecated in.
784
+ optional string deprecation_warning = 3;
785
+
786
+ // The edition this feature is no longer available in. In editions after
787
+ // this one, the last default assigned will be used, and proto files will
788
+ // not be able to override it.
789
+ optional Edition edition_removed = 4;
790
+ }
791
+ optional FeatureSupport feature_support = 22;
792
+
764
793
  // The parser stores options it doesn't recognize here. See above.
765
794
  repeated UninterpretedOption uninterpreted_option = 999;
766
795
 
@@ -941,6 +970,10 @@ message FeatureSet {
941
970
  retention = RETENTION_RUNTIME,
942
971
  targets = TARGET_TYPE_FIELD,
943
972
  targets = TARGET_TYPE_FILE,
973
+ // TODO Enable this in google3 once protoc rolls out.
974
+ feature_support = {
975
+ edition_introduced: EDITION_2023,
976
+ },
944
977
  edition_defaults = { edition: EDITION_PROTO2, value: "EXPLICIT" },
945
978
  edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" },
946
979
  edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" }
@@ -955,6 +988,10 @@ message FeatureSet {
955
988
  retention = RETENTION_RUNTIME,
956
989
  targets = TARGET_TYPE_ENUM,
957
990
  targets = TARGET_TYPE_FILE,
991
+ // TODO Enable this in google3 once protoc rolls out.
992
+ feature_support = {
993
+ edition_introduced: EDITION_2023,
994
+ },
958
995
  edition_defaults = { edition: EDITION_PROTO2, value: "CLOSED" },
959
996
  edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" }
960
997
  ];
@@ -968,19 +1005,27 @@ message FeatureSet {
968
1005
  retention = RETENTION_RUNTIME,
969
1006
  targets = TARGET_TYPE_FIELD,
970
1007
  targets = TARGET_TYPE_FILE,
1008
+ // TODO Enable this in google3 once protoc rolls out.
1009
+ feature_support = {
1010
+ edition_introduced: EDITION_2023,
1011
+ },
971
1012
  edition_defaults = { edition: EDITION_PROTO2, value: "EXPANDED" },
972
1013
  edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" }
973
1014
  ];
974
1015
 
975
1016
  enum Utf8Validation {
976
1017
  UTF8_VALIDATION_UNKNOWN = 0;
977
- NONE = 1;
978
1018
  VERIFY = 2;
1019
+ NONE = 3;
979
1020
  }
980
1021
  optional Utf8Validation utf8_validation = 4 [
981
1022
  retention = RETENTION_RUNTIME,
982
1023
  targets = TARGET_TYPE_FIELD,
983
1024
  targets = TARGET_TYPE_FILE,
1025
+ // TODO Enable this in google3 once protoc rolls out.
1026
+ feature_support = {
1027
+ edition_introduced: EDITION_2023,
1028
+ },
984
1029
  edition_defaults = { edition: EDITION_PROTO2, value: "NONE" },
985
1030
  edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" }
986
1031
  ];
@@ -994,6 +1039,10 @@ message FeatureSet {
994
1039
  retention = RETENTION_RUNTIME,
995
1040
  targets = TARGET_TYPE_FIELD,
996
1041
  targets = TARGET_TYPE_FILE,
1042
+ // TODO Enable this in google3 once protoc rolls out.
1043
+ feature_support = {
1044
+ edition_introduced: EDITION_2023,
1045
+ },
997
1046
  edition_defaults = { edition: EDITION_PROTO2, value: "LENGTH_PREFIXED" }
998
1047
  ];
999
1048
 
@@ -1007,6 +1056,10 @@ message FeatureSet {
1007
1056
  targets = TARGET_TYPE_MESSAGE,
1008
1057
  targets = TARGET_TYPE_ENUM,
1009
1058
  targets = TARGET_TYPE_FILE,
1059
+ // TODO Enable this in google3 once protoc rolls out.
1060
+ feature_support = {
1061
+ edition_introduced: EDITION_2023,
1062
+ },
1010
1063
  edition_defaults = { edition: EDITION_PROTO2, value: "LEGACY_BEST_EFFORT" },
1011
1064
  edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" }
1012
1065
  ];
@@ -1015,8 +1068,12 @@ message FeatureSet {
1015
1068
 
1016
1069
  extensions 1000; // for Protobuf C++
1017
1070
  extensions 1001; // for Protobuf Java
1071
+ extensions 1002; // for Protobuf Go
1072
+
1073
+ extensions 9990; // for deprecated Java Proto1
1018
1074
 
1019
1075
  extensions 9995 to 9999; // For internal testing
1076
+ extensions 10000; // for https://github.com/bufbuild/protobuf-es
1020
1077
  }
1021
1078
 
1022
1079
  // A compiled specification for the defaults of a set of features. These
@@ -1030,7 +1087,12 @@ message FeatureSetDefaults {
1030
1087
  // be used. This field must be in strict ascending order by edition.
1031
1088
  message FeatureSetEditionDefault {
1032
1089
  optional Edition edition = 3;
1033
- optional FeatureSet features = 2;
1090
+
1091
+ // Defaults of features that can be overridden in this edition.
1092
+ optional FeatureSet overridable_features = 4;
1093
+
1094
+ // Defaults of features that can't be overridden in this edition.
1095
+ optional FeatureSet fixed_features = 5;
1034
1096
  }
1035
1097
  repeated FeatureSetEditionDefault defaults = 1;
1036
1098
 
@@ -1098,7 +1160,7 @@ message SourceCodeInfo {
1098
1160
  // location.
1099
1161
  //
1100
1162
  // Each element is a field number or an index. They form a path from
1101
- // the root FileDescriptorProto to the place where the definition occurs.
1163
+ // the root FileDescriptorProto to the place where the definition appears.
1102
1164
  // For example, this path:
1103
1165
  // [ 4, 3, 2, 7, 1 ]
1104
1166
  // refers to:
@@ -11,6 +11,7 @@ option java_generate_equals_and_hash = true;
11
11
  option csharp_namespace = "Milvus.Client.Grpc";
12
12
 
13
13
  import "common.proto";
14
+ import "rg.proto";
14
15
  import "schema.proto";
15
16
  import "feder.proto";
16
17
  import "msg.proto";
@@ -45,6 +46,7 @@ service MilvusService {
45
46
  rpc ListAliases(ListAliasesRequest) returns (ListAliasesResponse) {}
46
47
 
47
48
  rpc CreateIndex(CreateIndexRequest) returns (common.Status) {}
49
+ rpc AlterIndex(AlterIndexRequest) returns (common.Status) {}
48
50
  rpc DescribeIndex(DescribeIndexRequest) returns (DescribeIndexResponse) {}
49
51
  rpc GetIndexStatistics(GetIndexStatisticsRequest) returns (GetIndexStatisticsResponse) {}
50
52
  // Deprecated: use DescribeIndex instead
@@ -61,6 +63,7 @@ service MilvusService {
61
63
  rpc Delete(DeleteRequest) returns (MutationResult) {}
62
64
  rpc Upsert(UpsertRequest) returns (MutationResult) {}
63
65
  rpc Search(SearchRequest) returns (SearchResults) {}
66
+ rpc HybridSearch(HybridSearchRequest) returns (SearchResults) {}
64
67
  rpc Flush(FlushRequest) returns (FlushResponse) {}
65
68
  rpc Query(QueryRequest) returns (QueryResults) {}
66
69
  rpc CalcDistance(CalcDistanceRequest) returns (CalcDistanceResults) {}
@@ -111,6 +114,7 @@ service MilvusService {
111
114
 
112
115
  rpc CreateResourceGroup(CreateResourceGroupRequest) returns (common.Status) {}
113
116
  rpc DropResourceGroup(DropResourceGroupRequest) returns (common.Status) {}
117
+ rpc UpdateResourceGroups(UpdateResourceGroupsRequest) returns (common.Status) {}
114
118
  rpc TransferNode(TransferNodeRequest) returns (common.Status) {}
115
119
  rpc TransferReplica(TransferReplicaRequest) returns (common.Status) {}
116
120
  rpc ListResourceGroups(ListResourceGroupsRequest) returns (ListResourceGroupsResponse) {}
@@ -133,6 +137,12 @@ service MilvusService {
133
137
  }
134
138
 
135
139
  message CreateAliasRequest {
140
+ option (common.privilege_ext_obj) = {
141
+ object_type: Global
142
+ object_privilege: PrivilegeCreateAlias
143
+ object_name_index: -1
144
+ };
145
+
136
146
  common.MsgBase base = 1;
137
147
  string db_name = 2;
138
148
  string collection_name = 3;
@@ -140,12 +150,24 @@ message CreateAliasRequest {
140
150
  }
141
151
 
142
152
  message DropAliasRequest {
153
+ option (common.privilege_ext_obj) = {
154
+ object_type: Global
155
+ object_privilege: PrivilegeDropAlias
156
+ object_name_index: -1
157
+ };
158
+
143
159
  common.MsgBase base = 1;
144
160
  string db_name = 2;
145
161
  string alias = 3;
146
162
  }
147
163
 
148
164
  message AlterAliasRequest{
165
+ option (common.privilege_ext_obj) = {
166
+ object_type: Global
167
+ object_privilege: PrivilegeCreateAlias
168
+ object_name_index: -1
169
+ };
170
+
149
171
  common.MsgBase base = 1;
150
172
  string db_name = 2;
151
173
  string collection_name = 3;
@@ -153,6 +175,12 @@ message AlterAliasRequest{
153
175
  }
154
176
 
155
177
  message DescribeAliasRequest{
178
+ option (common.privilege_ext_obj) = {
179
+ object_type: Global
180
+ object_privilege: PrivilegeDescribeAlias
181
+ object_name_index: -1
182
+ };
183
+
156
184
  common.MsgBase base = 1;
157
185
  string db_name = 2;
158
186
  string alias = 3;
@@ -170,6 +198,12 @@ message DescribeAliasResponse {
170
198
  }
171
199
 
172
200
  message ListAliasesRequest{
201
+ option (common.privilege_ext_obj) = {
202
+ object_type: Global
203
+ object_privilege: PrivilegeListAliases
204
+ object_name_index: -1
205
+ };
206
+
173
207
  common.MsgBase base = 1;
174
208
  string db_name = 2;
175
209
  string collection_name = 3;
@@ -320,6 +354,7 @@ message DescribeCollectionResponse {
320
354
  repeated common.KeyValuePair properties = 13;
321
355
  string db_name = 14;
322
356
  int64 num_partitions = 15;
357
+ int64 db_id = 16;
323
358
  }
324
359
 
325
360
  /**
@@ -476,6 +511,11 @@ message ShowCollectionsResponse {
476
511
  * Create partition in created collection.
477
512
  */
478
513
  message CreatePartitionRequest {
514
+ option (common.privilege_ext_obj) = {
515
+ object_type: Collection
516
+ object_privilege: PrivilegeCreatePartition
517
+ object_name_index: 3
518
+ };
479
519
  // Not useful for now
480
520
  common.MsgBase base = 1;
481
521
  string db_name = 2;
@@ -489,6 +529,11 @@ message CreatePartitionRequest {
489
529
  * Drop partition in created collection.
490
530
  */
491
531
  message DropPartitionRequest {
532
+ option (common.privilege_ext_obj) = {
533
+ object_type: Collection
534
+ object_privilege: PrivilegeDropPartition
535
+ object_name_index: 3
536
+ };
492
537
  // Not useful for now
493
538
  common.MsgBase base = 1;
494
539
  string db_name = 2;
@@ -502,6 +547,11 @@ message DropPartitionRequest {
502
547
  * Check if partition exist in collection or not.
503
548
  */
504
549
  message HasPartitionRequest {
550
+ option (common.privilege_ext_obj) = {
551
+ object_type: Collection
552
+ object_privilege: PrivilegeHasPartition
553
+ object_name_index: 3
554
+ };
505
555
  // Not useful for now
506
556
  common.MsgBase base = 1;
507
557
  string db_name = 2;
@@ -516,6 +566,11 @@ message HasPartitionRequest {
516
566
  * Then you can get these data as result when you do vector search on this collection.
517
567
  */
518
568
  message LoadPartitionsRequest {
569
+ option (common.privilege_ext_obj) = {
570
+ object_type: Collection
571
+ object_privilege: PrivilegeLoad
572
+ object_name_index: 3
573
+ };
519
574
  // Not useful for now
520
575
  common.MsgBase base = 1;
521
576
  string db_name = 2;
@@ -536,6 +591,11 @@ message LoadPartitionsRequest {
536
591
  * Then you can not get these data as result when you do vector search on this collection.
537
592
  */
538
593
  message ReleasePartitionsRequest {
594
+ option (common.privilege_ext_obj) = {
595
+ object_type: Collection
596
+ object_privilege: PrivilegeRelease
597
+ object_name_index: 3
598
+ };
539
599
  // Not useful for now
540
600
  common.MsgBase base = 1;
541
601
  string db_name = 2;
@@ -567,6 +627,11 @@ message GetPartitionStatisticsResponse {
567
627
  * List all partitions for particular collection
568
628
  */
569
629
  message ShowPartitionsRequest {
630
+ option (common.privilege_ext_obj) = {
631
+ object_type: Collection
632
+ object_privilege: PrivilegeShowPartitions
633
+ object_name_index: 3
634
+ };
570
635
  // Not useful for now
571
636
  common.MsgBase base = 1;
572
637
  string db_name = 2;
@@ -648,6 +713,23 @@ message CreateIndexRequest {
648
713
  string index_name = 6;
649
714
  }
650
715
 
716
+ /*
717
+ * Alter index
718
+ */
719
+ message AlterIndexRequest {
720
+ option (common.privilege_ext_obj) = {
721
+ object_type: Collection
722
+ object_privilege: PrivilegeCreateIndex
723
+ object_name_index: 3
724
+ };
725
+
726
+ common.MsgBase base = 1;
727
+ string db_name = 2;
728
+ string collection_name = 3;
729
+ string index_name = 4;
730
+ repeated common.KeyValuePair extra_params = 5;
731
+ }
732
+
651
733
  /*
652
734
  * Get created index information.
653
735
  * Current release of Milvus only supports showing latest built index.
@@ -814,6 +896,17 @@ message DeleteRequest {
814
896
  string partition_name = 4;
815
897
  string expr = 5;
816
898
  repeated uint32 hash_keys = 6;
899
+ common.ConsistencyLevel consistency_level = 7;
900
+ }
901
+
902
+
903
+ message SubSearchRequest {
904
+ string dsl = 1; // must
905
+ // serialized `PlaceholderGroup`
906
+ bytes placeholder_group = 2; // must
907
+ common.DslType dsl_type = 3; // must
908
+ repeated common.KeyValuePair search_params = 4; // must
909
+ int64 nq = 5;
817
910
  }
818
911
 
819
912
 
@@ -840,6 +933,7 @@ message SearchRequest {
840
933
  common.ConsistencyLevel consistency_level = 14;
841
934
  bool use_default_consistency = 15;
842
935
  bool search_by_primary_keys = 16;
936
+ repeated SubSearchRequest sub_reqs = 17;
843
937
  }
844
938
 
845
939
  message Hits {
@@ -854,6 +948,26 @@ message SearchResults {
854
948
  string collection_name = 3;
855
949
  }
856
950
 
951
+ message HybridSearchRequest {
952
+ option (common.privilege_ext_obj) = {
953
+ object_type: Collection
954
+ object_privilege: PrivilegeSearch
955
+ object_name_index: 3
956
+ };
957
+ common.MsgBase base = 1; // must
958
+ string db_name = 2;
959
+ string collection_name = 3; // must
960
+ repeated string partition_names = 4; // must
961
+ repeated SearchRequest requests = 5;
962
+ repeated common.KeyValuePair rank_params = 6; // must
963
+ uint64 travel_timestamp = 7;
964
+ uint64 guarantee_timestamp = 8; // guarantee_timestamp
965
+ bool not_return_all_meta = 9;
966
+ repeated string output_fields = 10;
967
+ common.ConsistencyLevel consistency_level = 11;
968
+ bool use_default_consistency = 12;
969
+ }
970
+
857
971
  message FlushRequest {
858
972
  option (common.privilege_ext_obj) = {
859
973
  object_type: Collection
@@ -1058,6 +1172,7 @@ message ManualCompactionRequest {
1058
1172
  };
1059
1173
  int64 collectionID = 1;
1060
1174
  uint64 timetravel = 2;
1175
+ bool majorCompaction = 3;
1061
1176
  }
1062
1177
 
1063
1178
  message ManualCompactionResponse {
@@ -1095,6 +1210,11 @@ message CompactionMergeInfo {
1095
1210
  }
1096
1211
 
1097
1212
  message GetFlushStateRequest {
1213
+ option (common.privilege_ext_obj) = {
1214
+ object_type: Collection
1215
+ object_privilege: PrivilegeGetFlushState
1216
+ object_name_index: 4
1217
+ };
1098
1218
  repeated int64 segmentIDs = 1;
1099
1219
  uint64 flush_ts = 2;
1100
1220
  string db_name = 3;
@@ -1129,7 +1249,8 @@ message ImportRequest {
1129
1249
  bool row_based = 4; // the file is row-based or column-based
1130
1250
  repeated string files = 5; // file paths to be imported
1131
1251
  repeated common.KeyValuePair options = 6; // import options, bucket, etc.
1132
- string db_name = 7;
1252
+ string db_name = 7; // target database
1253
+ bytes clustering_info = 8; // serialized `schema.ClusteringInfo`
1133
1254
  }
1134
1255
 
1135
1256
  message ImportResponse {
@@ -1523,6 +1644,17 @@ message CreateResourceGroupRequest {
1523
1644
  };
1524
1645
  common.MsgBase base = 1;
1525
1646
  string resource_group = 2;
1647
+ rg.ResourceGroupConfig config = 3;
1648
+ }
1649
+
1650
+ message UpdateResourceGroupsRequest {
1651
+ option (common.privilege_ext_obj) = {
1652
+ object_type: Global
1653
+ object_privilege: PrivilegeUpdateResourceGroups
1654
+ object_name_index: -1
1655
+ };
1656
+ common.MsgBase base = 1;
1657
+ map<string, rg.ResourceGroupConfig> resource_groups = 2;
1526
1658
  }
1527
1659
 
1528
1660
  message DropResourceGroupRequest {
@@ -1600,8 +1732,12 @@ message ResourceGroup {
1600
1732
  map<string, int32> num_loaded_replica = 4;
1601
1733
  // collection name -> accessed other rg's node num
1602
1734
  map<string, int32> num_outgoing_node = 5;
1603
- // collection name -> be accessed node num by other rg
1735
+ // collection name -> be accessed node num by other rg
1604
1736
  map<string, int32> num_incoming_node = 6;
1737
+ // resource group configuration.
1738
+ rg.ResourceGroupConfig config = 7;
1739
+ // query node belong to this resource group now.
1740
+ repeated common.NodeInfo nodes = 8;
1605
1741
  }
1606
1742
 
1607
1743
  message RenameCollectionRequest {
@@ -1715,3 +1851,33 @@ message ReplicateMessageResponse {
1715
1851
  common.Status status = 1;
1716
1852
  string position = 2;
1717
1853
  }
1854
+
1855
+ message ImportAuthPlaceholder {
1856
+ option (common.privilege_ext_obj) = {
1857
+ object_type: Collection
1858
+ object_privilege: PrivilegeImport
1859
+ object_name_index: 1
1860
+ };
1861
+ string db_name = 1;
1862
+ string collection_name = 2;
1863
+ string partition_name = 3;
1864
+ }
1865
+
1866
+ message GetImportProgressAuthPlaceholder {
1867
+ option (common.privilege_ext_obj) = {
1868
+ object_type: Collection
1869
+ object_privilege: PrivilegeImport
1870
+ object_name_index: 1
1871
+ };
1872
+ string db_name = 1;
1873
+ }
1874
+
1875
+ message ListImportsAuthPlaceholder {
1876
+ option (common.privilege_ext_obj) = {
1877
+ object_type: Collection
1878
+ object_privilege: PrivilegeImport
1879
+ object_name_index: 1
1880
+ };
1881
+ string db_name = 3;
1882
+ string collection_name = 1;
1883
+ }
@@ -0,0 +1,28 @@
1
+ syntax = "proto3";
2
+ package milvus.proto.rg;
3
+
4
+ option go_package = "github.com/milvus-io/milvus-proto/go-api/v2/rgpb";
5
+
6
+ option java_multiple_files = true;
7
+ option java_package = "io.milvus.grpc";
8
+ option java_outer_classname = "ResourceGroupProto";
9
+ option java_generate_equals_and_hash = true;
10
+
11
+ option csharp_namespace = "Milvus.Client.Grpc";
12
+
13
+ message ResourceGroupLimit {
14
+ int32 node_num = 1;
15
+ // preserve for other limit.
16
+ }
17
+
18
+ message ResourceGroupTransfer {
19
+ string resource_group = 1; // resource groups can be transfered with current resource group.
20
+ // preserve for other option, such as weight, priority or affinity setup.
21
+ }
22
+
23
+ message ResourceGroupConfig {
24
+ ResourceGroupLimit requests = 1; // requests node num in resource group, if node num is less than requests.nodeNum, it will be transfer from other resource group.
25
+ ResourceGroupLimit limits = 2; // limited node num in resource group, if node num is more than limits.nodeNum, it will be transfer to other resource group.
26
+ repeated ResourceGroupTransfer transfer_from = 3; // missing node should be transfer from given resource group at high priority in repeated list.
27
+ repeated ResourceGroupTransfer transfer_to = 4; // redundant node should be transfer to given resource group at high priority in repeated list.
28
+ }