@zilliz/milvus2-sdk-node 2.2.3 → 2.2.5
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 +4 -21
- package/dist/milvus/BaseClient.d.ts +17 -0
- package/dist/milvus/BaseClient.js +58 -0
- package/dist/milvus/BaseClient.js.map +1 -0
- package/dist/milvus/Collection.d.ts +263 -171
- package/dist/milvus/Collection.js +328 -233
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.d.ts +142 -142
- package/dist/milvus/Data.js +211 -216
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/MilvusClient.d.ts +17 -0
- package/dist/milvus/MilvusClient.js +163 -0
- package/dist/milvus/MilvusClient.js.map +1 -0
- package/dist/milvus/MilvusIndex.d.ts +64 -60
- package/dist/milvus/MilvusIndex.js +74 -69
- package/dist/milvus/MilvusIndex.js.map +1 -1
- package/dist/milvus/Partition.d.ts +95 -88
- package/dist/milvus/Partition.js +108 -101
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/Resource.d.ts +172 -0
- package/dist/milvus/Resource.js +356 -0
- package/dist/milvus/Resource.js.map +1 -0
- package/dist/milvus/User.d.ts +136 -110
- package/dist/milvus/User.js +171 -140
- package/dist/milvus/User.js.map +1 -1
- package/dist/milvus/Utils.d.ts +1 -1
- package/dist/milvus/Utils.js +1 -1
- package/dist/milvus/Utils.js.map +1 -1
- package/dist/milvus/const/Milvus.d.ts +270 -0
- package/dist/milvus/const/Milvus.js +370 -1
- package/dist/milvus/const/Milvus.js.map +1 -1
- package/dist/milvus/index.d.ts +11 -46
- package/dist/milvus/index.js +16 -186
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +88 -8
- package/dist/milvus/types/Collection.js +1 -9
- package/dist/milvus/types/Collection.js.map +1 -1
- package/dist/milvus/types/Common.d.ts +11 -267
- package/dist/milvus/types/Common.js +1 -369
- package/dist/milvus/types/Common.js.map +1 -1
- package/dist/milvus/types/Data.d.ts +154 -1
- package/dist/milvus/types/Index.d.ts +20 -1
- package/dist/milvus/types/Partition.d.ts +8 -1
- package/dist/milvus/types/Resource.d.ts +44 -0
- package/dist/milvus/types/{Search.js → Resource.js} +1 -1
- package/dist/milvus/types/Resource.js.map +1 -0
- package/dist/milvus/types/Response.d.ts +0 -246
- package/dist/milvus/types/Response.js.map +1 -1
- package/dist/milvus/types/User.d.ts +54 -2
- package/dist/milvus/types.d.ts +8 -7
- package/dist/milvus/types.js +2 -1
- package/dist/milvus/types.js.map +1 -1
- package/dist/proto/proto/common.proto +23 -2
- package/dist/proto/proto/feder.proto +40 -0
- package/dist/proto/proto/google/protobuf/descriptor.proto +31 -1
- package/dist/proto/proto/milvus.proto +101 -0
- package/dist/proto/proto/msg.proto +107 -0
- package/dist/proto/proto/schema.proto +18 -23
- package/dist/sdk.json +1 -1
- package/dist/utils/Blob.js.map +1 -0
- package/dist/{milvus/utils → utils}/Format.d.ts +12 -11
- package/dist/{milvus/utils → utils}/Format.js +18 -17
- package/dist/utils/Format.js.map +1 -0
- package/dist/utils/Function.d.ts +4 -0
- package/dist/utils/Function.js +33 -0
- package/dist/utils/Function.js.map +1 -0
- package/dist/utils/Grpc.d.ts +19 -0
- package/dist/utils/Grpc.js +64 -0
- package/dist/utils/Grpc.js.map +1 -0
- package/dist/utils/Validate.d.ts +21 -0
- package/dist/{milvus/utils → utils}/Validate.js +28 -6
- package/dist/utils/Validate.js.map +1 -0
- package/dist/utils/index.d.ts +5 -7
- package/dist/utils/index.js +17 -52
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/test.d.ts +14 -0
- package/dist/utils/test.js +68 -0
- package/dist/utils/test.js.map +1 -0
- package/package.json +7 -12
- package/dist/milvus/Client.d.ts +0 -12
- package/dist/milvus/Client.js +0 -28
- package/dist/milvus/Client.js.map +0 -1
- package/dist/milvus/types/Search.d.ts +0 -81
- package/dist/milvus/types/Search.js.map +0 -1
- package/dist/milvus/utils/Blob.js.map +0 -1
- package/dist/milvus/utils/Format.js.map +0 -1
- package/dist/milvus/utils/Validate.d.ts +0 -9
- package/dist/milvus/utils/Validate.js.map +0 -1
- package/dist/milvus/utils/index.d.ts +0 -3
- package/dist/milvus/utils/index.js +0 -10
- package/dist/milvus/utils/index.js.map +0 -1
- /package/dist/{milvus/utils → utils}/Blob.d.ts +0 -0
- /package/dist/{milvus/utils → utils}/Blob.js +0 -0
|
@@ -40,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
40
40
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
41
|
function step(op) {
|
|
42
42
|
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (_) try {
|
|
43
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
44
44
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
45
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
46
|
switch (op[0]) {
|
|
@@ -64,8 +64,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
65
|
exports.Index = void 0;
|
|
66
66
|
var utils_1 = require("../utils");
|
|
67
|
-
var
|
|
68
|
-
var
|
|
67
|
+
var Data_1 = require("./Data");
|
|
68
|
+
var utils_2 = require("../utils");
|
|
69
69
|
var Index = /** @class */ (function (_super) {
|
|
70
70
|
__extends(Index, _super);
|
|
71
71
|
function Index() {
|
|
@@ -75,25 +75,26 @@ var Index = /** @class */ (function (_super) {
|
|
|
75
75
|
* Create an index on a vector field. Note that index building is an async progress.
|
|
76
76
|
*
|
|
77
77
|
* @param data
|
|
78
|
-
* | Property
|
|
79
|
-
* |
|
|
80
|
-
* | collection_name
|
|
81
|
-
* | field_name
|
|
82
|
-
* | index_name
|
|
83
|
-
* | extra_params
|
|
84
|
-
* | timeout
|
|
78
|
+
* | Property | Type | Description |
|
|
79
|
+
* | :-- | :-- | :-- |
|
|
80
|
+
* | collection_name | String | Collection name |
|
|
81
|
+
* | field_name | String | Field name |
|
|
82
|
+
* | index_name | String | Index name is unique in one collection |
|
|
83
|
+
* | extra_params | Object | Parameters: { index_type: string; metric_type: string; params: string; }; |
|
|
84
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
85
|
+
|
|
85
86
|
*
|
|
86
|
-
* @
|
|
87
|
-
* | Property
|
|
88
|
-
* |
|
|
89
|
-
* | error_code
|
|
90
|
-
* | reason
|
|
87
|
+
* @returns
|
|
88
|
+
* | Property | Description |
|
|
89
|
+
* | :-- | :-- |
|
|
90
|
+
* | error_code | Error code number |
|
|
91
|
+
* | reason | Error cause |
|
|
91
92
|
*
|
|
92
93
|
*
|
|
93
94
|
* #### Example
|
|
94
95
|
*
|
|
95
96
|
* ```
|
|
96
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
97
|
+
* new milvusClient(MILUVS_ADDRESS).createIndex({
|
|
97
98
|
* collection_name: 'my_collection',
|
|
98
99
|
* field_name: "vector_01",
|
|
99
100
|
* extra_params: {
|
|
@@ -110,9 +111,9 @@ var Index = /** @class */ (function (_super) {
|
|
|
110
111
|
return __generator(this, function (_a) {
|
|
111
112
|
switch (_a.label) {
|
|
112
113
|
case 0:
|
|
113
|
-
|
|
114
|
-
params = __assign(__assign({}, data), { extra_params: (0,
|
|
115
|
-
return [4 /*yield*/, (0, utils_1.promisify)(this.
|
|
114
|
+
(0, utils_2.checkCollectionName)(data);
|
|
115
|
+
params = __assign(__assign({}, data), { extra_params: (0, utils_2.parseToKeyValue)(data.extra_params) });
|
|
116
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'CreateIndex', params, data.timeout)];
|
|
116
117
|
case 1:
|
|
117
118
|
promise = _a.sent();
|
|
118
119
|
return [2 /*return*/, promise];
|
|
@@ -124,14 +125,15 @@ var Index = /** @class */ (function (_super) {
|
|
|
124
125
|
* Show index information. Current release of Milvus only supports showing latest built index.
|
|
125
126
|
*
|
|
126
127
|
* @param data
|
|
127
|
-
* | Property
|
|
128
|
-
* |
|
|
129
|
-
* | collection_name
|
|
130
|
-
* | timeout
|
|
128
|
+
* | Property | Type | Description |
|
|
129
|
+
* | :-- | :-- | :-- |
|
|
130
|
+
* | collection_name | String | Collection name |
|
|
131
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
132
|
+
|
|
131
133
|
*
|
|
132
|
-
* @
|
|
134
|
+
* @returns
|
|
133
135
|
* | Property | Description |
|
|
134
|
-
* |
|
|
136
|
+
* | :-- | :-- |
|
|
135
137
|
* | status | { error_code: number, reason: string } |
|
|
136
138
|
* | index_descriptions | Index information |
|
|
137
139
|
*
|
|
@@ -139,7 +141,7 @@ var Index = /** @class */ (function (_super) {
|
|
|
139
141
|
* #### Example
|
|
140
142
|
*
|
|
141
143
|
* ```
|
|
142
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
144
|
+
* new milvusClient(MILUVS_ADDRESS).describeIndex({
|
|
143
145
|
* collection_name: 'my_collection',
|
|
144
146
|
* });
|
|
145
147
|
* ```
|
|
@@ -150,8 +152,8 @@ var Index = /** @class */ (function (_super) {
|
|
|
150
152
|
return __generator(this, function (_a) {
|
|
151
153
|
switch (_a.label) {
|
|
152
154
|
case 0:
|
|
153
|
-
|
|
154
|
-
return [4 /*yield*/, (0, utils_1.promisify)(this.
|
|
155
|
+
(0, utils_2.checkCollectionName)(data);
|
|
156
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'DescribeIndex', data, data.timeout)];
|
|
155
157
|
case 1:
|
|
156
158
|
promise = _a.sent();
|
|
157
159
|
return [2 /*return*/, promise];
|
|
@@ -163,23 +165,24 @@ var Index = /** @class */ (function (_super) {
|
|
|
163
165
|
* Show index building state.
|
|
164
166
|
*
|
|
165
167
|
* @param data
|
|
166
|
-
* | Property
|
|
167
|
-
* |
|
|
168
|
-
* | collection_name
|
|
169
|
-
* | field_name
|
|
170
|
-
* | timeout
|
|
168
|
+
* | Property | Type | Description |
|
|
169
|
+
* | :-- | :-- | :-- |
|
|
170
|
+
* | collection_name | string | Collection name |
|
|
171
|
+
* | field_name | string | Field name |
|
|
172
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
173
|
+
|
|
171
174
|
*
|
|
172
|
-
* @
|
|
173
|
-
* | Property
|
|
174
|
-
* |
|
|
175
|
-
* | status
|
|
176
|
-
* | state
|
|
175
|
+
* @returns
|
|
176
|
+
* | Property | Description |
|
|
177
|
+
* | :-- | :-- |
|
|
178
|
+
* | status | { error_code: number, reason: string } |
|
|
179
|
+
* | state | Index building state |
|
|
177
180
|
*
|
|
178
181
|
*
|
|
179
182
|
* #### Example
|
|
180
183
|
*
|
|
181
184
|
* ```
|
|
182
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
185
|
+
* new milvusClient(MILUVS_ADDRESS).getIndexState({
|
|
183
186
|
* collection_name: 'my_collection',
|
|
184
187
|
* });
|
|
185
188
|
* ```
|
|
@@ -190,8 +193,8 @@ var Index = /** @class */ (function (_super) {
|
|
|
190
193
|
return __generator(this, function (_a) {
|
|
191
194
|
switch (_a.label) {
|
|
192
195
|
case 0:
|
|
193
|
-
|
|
194
|
-
return [4 /*yield*/, (0, utils_1.promisify)(this.
|
|
196
|
+
(0, utils_2.checkCollectionName)(data);
|
|
197
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'GetIndexState', data, data.timeout)];
|
|
195
198
|
case 1:
|
|
196
199
|
promise = _a.sent();
|
|
197
200
|
return [2 /*return*/, promise];
|
|
@@ -203,25 +206,26 @@ var Index = /** @class */ (function (_super) {
|
|
|
203
206
|
* Show index building progress.
|
|
204
207
|
*
|
|
205
208
|
* @param data
|
|
206
|
-
* | Property
|
|
207
|
-
* |
|
|
208
|
-
* | collection_name
|
|
209
|
-
* | field_name
|
|
210
|
-
* | timeout
|
|
209
|
+
* | Property | Type | Description |
|
|
210
|
+
* | :-- | :-- | :-- |
|
|
211
|
+
* | collection_name | String | Collection name |
|
|
212
|
+
* | field_name | String | Field name |
|
|
213
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
214
|
+
|
|
211
215
|
*
|
|
212
|
-
* @
|
|
213
|
-
* | Property
|
|
214
|
-
* |
|
|
215
|
-
* | status
|
|
216
|
-
* | indexed_rows
|
|
217
|
-
* | total_rows
|
|
216
|
+
* @returns
|
|
217
|
+
* | Property | Description |
|
|
218
|
+
* | :-- | :-- |
|
|
219
|
+
* | status | { error_code: number, reason: string } |
|
|
220
|
+
* | indexed_rows | Row count that successfully built with index |
|
|
221
|
+
* | total_rows | Total row count |
|
|
218
222
|
*
|
|
219
223
|
*
|
|
220
224
|
*
|
|
221
225
|
* #### Example
|
|
222
226
|
*
|
|
223
227
|
* ```
|
|
224
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
228
|
+
* new milvusClient(MILUVS_ADDRESS).getIndexBuildProgress({
|
|
225
229
|
* collection_name: 'my_collection',
|
|
226
230
|
* });
|
|
227
231
|
* ```
|
|
@@ -232,8 +236,8 @@ var Index = /** @class */ (function (_super) {
|
|
|
232
236
|
return __generator(this, function (_a) {
|
|
233
237
|
switch (_a.label) {
|
|
234
238
|
case 0:
|
|
235
|
-
|
|
236
|
-
return [4 /*yield*/, (0, utils_1.promisify)(this.
|
|
239
|
+
(0, utils_2.checkCollectionName)(data);
|
|
240
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'GetIndexBuildProgress', data, data.timeout)];
|
|
237
241
|
case 1:
|
|
238
242
|
promise = _a.sent();
|
|
239
243
|
return [2 /*return*/, promise];
|
|
@@ -245,22 +249,23 @@ var Index = /** @class */ (function (_super) {
|
|
|
245
249
|
* Drop an index.
|
|
246
250
|
*
|
|
247
251
|
* @param data
|
|
248
|
-
* | Property
|
|
249
|
-
* |
|
|
250
|
-
* | collection_name
|
|
251
|
-
* | field_name
|
|
252
|
-
* | timeout
|
|
252
|
+
* | Property | Type | Description |
|
|
253
|
+
* | :-- | :-- | :-- |
|
|
254
|
+
* | collection_name | String | Collection name |
|
|
255
|
+
* | field_name | String | Field name |
|
|
256
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
257
|
+
|
|
253
258
|
*
|
|
254
|
-
* @
|
|
255
|
-
* | Property
|
|
256
|
-
* |
|
|
257
|
-
* | error_code
|
|
258
|
-
* | reason
|
|
259
|
+
* @returns
|
|
260
|
+
* | Property | Description |
|
|
261
|
+
* | :-- | :-- |
|
|
262
|
+
* | error_code | Error code number |
|
|
263
|
+
* | reason | Error cause |
|
|
259
264
|
*
|
|
260
265
|
* #### Example
|
|
261
266
|
*
|
|
262
267
|
* ```
|
|
263
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
268
|
+
* new milvusClient(MILUVS_ADDRESS).dropIndex({
|
|
264
269
|
* collection_name: 'my_collection',
|
|
265
270
|
* });
|
|
266
271
|
* ```
|
|
@@ -271,8 +276,8 @@ var Index = /** @class */ (function (_super) {
|
|
|
271
276
|
return __generator(this, function (_a) {
|
|
272
277
|
switch (_a.label) {
|
|
273
278
|
case 0:
|
|
274
|
-
|
|
275
|
-
return [4 /*yield*/, (0, utils_1.promisify)(this.
|
|
279
|
+
(0, utils_2.checkCollectionName)(data);
|
|
280
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'DropIndex', data, data.timeout)];
|
|
276
281
|
case 1:
|
|
277
282
|
promise = _a.sent();
|
|
278
283
|
return [2 /*return*/, promise];
|
|
@@ -281,6 +286,6 @@ var Index = /** @class */ (function (_super) {
|
|
|
281
286
|
});
|
|
282
287
|
};
|
|
283
288
|
return Index;
|
|
284
|
-
}(
|
|
289
|
+
}(Data_1.Data));
|
|
285
290
|
exports.Index = Index;
|
|
286
291
|
//# sourceMappingURL=MilvusIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MilvusIndex.js","sourceRoot":"","sources":["../../milvus/MilvusIndex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAqC;AACrC
|
|
1
|
+
{"version":3,"file":"MilvusIndex.js","sourceRoot":"","sources":["../../milvus/MilvusIndex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAqC;AACrC,+BAA8B;AAC9B,kCAAgE;AAahE;IAA2B,yBAAI;IAA/B;;IAwMA,CAAC;IAvMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,2BAAW,GAAjB,UAAkB,IAAoB;;;;;;wBACpC,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;wBAEpB,MAAM,yBACP,IAAI,KACP,YAAY,EAAE,IAAA,uBAAe,EAAC,IAAI,CAAC,YAAY,CAAC,GACjD,CAAC;wBACc,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,UAAU,EACf,aAAa,EACb,MAAM,EACN,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,6BAAa,GAAnB,UAAoB,IAAsB;;;;;;wBACxC,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,UAAU,EACf,eAAe,EACf,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,6BAAa,GAAnB,UAAoB,IAAsB;;;;;;wBACxC,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,UAAU,EACf,eAAe,EACf,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACG,qCAAqB,GAA3B,UACE,IAA8B;;;;;;wBAE9B,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,UAAU,EACf,uBAAuB,EACvB,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,yBAAS,GAAf,UAAgB,IAAkB;;;;;;wBAChC,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,UAAU,EACf,WAAW,EACX,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IACH,YAAC;AAAD,CAAC,AAxMD,CAA2B,WAAI,GAwM9B;AAxMY,sBAAK"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResStatus, BoolResponse, ShowPartitionsResponse, StatisticsResponse } from '
|
|
3
|
-
|
|
4
|
-
export declare class Partition extends Client {
|
|
1
|
+
import { Index } from './MilvusIndex';
|
|
2
|
+
import { CreatePartitionReq, DropPartitionReq, GetPartitionStatisticsReq, HasPartitionReq, LoadPartitionsReq, ReleasePartitionsReq, ShowPartitionsReq, ResStatus, BoolResponse, ShowPartitionsResponse, StatisticsResponse } from '.';
|
|
3
|
+
export declare class Partition extends Index {
|
|
5
4
|
/**
|
|
6
5
|
* Create a partition in a collection.
|
|
7
6
|
*
|
|
8
7
|
* @param data
|
|
9
|
-
* | Property
|
|
10
|
-
* |
|
|
11
|
-
* | collection_name
|
|
12
|
-
* | partition_name
|
|
13
|
-
* | timeout
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* |
|
|
18
|
-
* |
|
|
19
|
-
* |
|
|
8
|
+
* | Property | Type | Description |
|
|
9
|
+
* | :-- | :-- | :-- |
|
|
10
|
+
* | collection_name | String | Collection name |
|
|
11
|
+
* | partition_name | String | Partition name |
|
|
12
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
13
|
+
|
|
14
|
+
*
|
|
15
|
+
* @returns
|
|
16
|
+
* | Property | Description |
|
|
17
|
+
* | :-- | :-- |
|
|
18
|
+
* | error_code | Error code number |
|
|
19
|
+
* | reason | Error cause |
|
|
20
20
|
*
|
|
21
21
|
* #### Example
|
|
22
22
|
*
|
|
23
23
|
* ```
|
|
24
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
24
|
+
* new milvusClient(MILUVS_ADDRESS).createPartition({
|
|
25
25
|
* collection_name: 'my_collection',
|
|
26
26
|
* partition_name: 'my_partition',
|
|
27
27
|
* });
|
|
@@ -32,22 +32,23 @@ export declare class Partition extends Client {
|
|
|
32
32
|
* Check if a partition exists in a collection.
|
|
33
33
|
*
|
|
34
34
|
* @param data
|
|
35
|
-
* | Property
|
|
36
|
-
* |
|
|
37
|
-
* | collection_name
|
|
38
|
-
* | partition_name
|
|
39
|
-
* | timeout
|
|
40
|
-
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* |
|
|
45
|
-
* |
|
|
35
|
+
* | Property | Type | Description |
|
|
36
|
+
* | :-- | :-- | :-- |
|
|
37
|
+
* | collection_name | string | Collection name |
|
|
38
|
+
* | partition_name | string | Parititon name |
|
|
39
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
40
|
+
|
|
41
|
+
*
|
|
42
|
+
* @returns
|
|
43
|
+
* | Property | Description |
|
|
44
|
+
* | :-- | :-- |
|
|
45
|
+
* | status | { error_code: number,reason:string } |
|
|
46
|
+
* | value | `true` or `false` |
|
|
46
47
|
*
|
|
47
48
|
* #### Example
|
|
48
49
|
*
|
|
49
50
|
* ```
|
|
50
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
51
|
+
* new milvusClient(MILUVS_ADDRESS).hasPartition({
|
|
51
52
|
* collection_name: 'my_collection',
|
|
52
53
|
* partition_name: 'my_partition',
|
|
53
54
|
* });
|
|
@@ -58,23 +59,24 @@ export declare class Partition extends Client {
|
|
|
58
59
|
* Show all partitions in a collection.
|
|
59
60
|
*
|
|
60
61
|
* @param data
|
|
61
|
-
* | Property
|
|
62
|
-
* |
|
|
63
|
-
* | collection_name
|
|
64
|
-
* | timeout
|
|
62
|
+
* | Property | Type | Description |
|
|
63
|
+
* | :-- | :-- | :-- |
|
|
64
|
+
* | collection_name | String | Collection name |
|
|
65
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
66
|
+
|
|
65
67
|
*
|
|
66
|
-
* @
|
|
67
|
-
*
|
|
68
|
-
* |
|
|
69
|
-
* | status
|
|
70
|
-
* | partition_names
|
|
71
|
-
* | partitionIDs
|
|
68
|
+
* @returns
|
|
69
|
+
* | Property | Description |
|
|
70
|
+
* | :-- | :-- |
|
|
71
|
+
* | status | { error_code: number, reason: string } |
|
|
72
|
+
* | partition_names | Array of partition names |
|
|
73
|
+
* | partitionIDs | Array of partition IDs |
|
|
72
74
|
*
|
|
73
75
|
*
|
|
74
76
|
* #### Example
|
|
75
77
|
*
|
|
76
78
|
* ```
|
|
77
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
79
|
+
* new milvusClient(MILUVS_ADDRESS).showPartitions({
|
|
78
80
|
* collection_name: 'my_collection',
|
|
79
81
|
* });
|
|
80
82
|
* ```
|
|
@@ -84,24 +86,25 @@ export declare class Partition extends Client {
|
|
|
84
86
|
* Show the statistics information of a partition.
|
|
85
87
|
*
|
|
86
88
|
* @param data
|
|
87
|
-
* | Property
|
|
88
|
-
* |
|
|
89
|
-
* | collection_name
|
|
90
|
-
* | partition_name
|
|
91
|
-
* | timeout
|
|
89
|
+
* | Property | Type | Description |
|
|
90
|
+
* | :-- | :-- | :-- |
|
|
91
|
+
* | collection_name | String | Collection name |
|
|
92
|
+
* | partition_name | String | Partition name |
|
|
93
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
94
|
+
|
|
92
95
|
*
|
|
93
|
-
* @
|
|
94
|
-
*
|
|
95
|
-
* |
|
|
96
|
-
* | status
|
|
97
|
-
* | stats
|
|
98
|
-
* | data |
|
|
96
|
+
* @returns
|
|
97
|
+
* | Property | Description |
|
|
98
|
+
* | :-- | :-- |
|
|
99
|
+
* | status | { error_code: number, reason: string } |
|
|
100
|
+
* | stats | [{key: string, value: string}] |
|
|
101
|
+
* | data | { row_count: 0 } transformed from **stats** |
|
|
99
102
|
*
|
|
100
103
|
*
|
|
101
104
|
* #### Example
|
|
102
105
|
*
|
|
103
106
|
* ```
|
|
104
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
107
|
+
* new milvusClient(MILUVS_ADDRESS).getPartitionStatistics({
|
|
105
108
|
* collection_name: 'my_collection',
|
|
106
109
|
* partition_name: "_default",
|
|
107
110
|
* });
|
|
@@ -109,25 +112,27 @@ export declare class Partition extends Client {
|
|
|
109
112
|
*/
|
|
110
113
|
getPartitionStatistics(data: GetPartitionStatisticsReq): Promise<StatisticsResponse>;
|
|
111
114
|
/**
|
|
112
|
-
* Load
|
|
115
|
+
* Load multiple partitions into query nodes.
|
|
113
116
|
*
|
|
114
117
|
* @param data
|
|
115
|
-
* | Property
|
|
116
|
-
* |
|
|
117
|
-
* | collection_name
|
|
118
|
-
* | partition_names
|
|
119
|
-
* |
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* |
|
|
125
|
-
* |
|
|
118
|
+
* | Property | Type | Description |
|
|
119
|
+
* | :--- | :-- | :-- |
|
|
120
|
+
* | collection_name | String | Collection name |
|
|
121
|
+
* | partition_names | String[] | Array of partition names |
|
|
122
|
+
* | replica_number? | number | replica number |
|
|
123
|
+
* | resource_groups | String[] | resource group names |
|
|
124
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
125
|
+
*
|
|
126
|
+
* @returns
|
|
127
|
+
* | Property | Description |
|
|
128
|
+
* | :-- | :-- |
|
|
129
|
+
* | error_code | Error code number |
|
|
130
|
+
* | reason | Error cause |
|
|
126
131
|
*
|
|
127
132
|
* #### Example
|
|
128
133
|
*
|
|
129
134
|
* ```
|
|
130
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
135
|
+
* new milvusClient(MILUVS_ADDRESS).loadPartitions({
|
|
131
136
|
* collection_name: 'my_collection',
|
|
132
137
|
* partition_names: ['my_partition'],
|
|
133
138
|
* });
|
|
@@ -138,22 +143,23 @@ export declare class Partition extends Client {
|
|
|
138
143
|
* Release a partition from cache.
|
|
139
144
|
*
|
|
140
145
|
* @param data
|
|
141
|
-
* | Property
|
|
142
|
-
* |
|
|
143
|
-
* | collection_name
|
|
144
|
-
* | partition_names
|
|
145
|
-
* | timeout
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* |
|
|
150
|
-
* |
|
|
151
|
-
* |
|
|
146
|
+
* | Property | Type | Description |
|
|
147
|
+
* | :-- | :-- | :-- |
|
|
148
|
+
* | collection_name | String | Collection name |
|
|
149
|
+
* | partition_names | String[] | Array of partition names |
|
|
150
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
151
|
+
|
|
152
|
+
*
|
|
153
|
+
* @returns
|
|
154
|
+
* | Property | Description |
|
|
155
|
+
* | :-- | :-- |
|
|
156
|
+
* | error_code | Error code number |
|
|
157
|
+
* | reason | Error cause |
|
|
152
158
|
*
|
|
153
159
|
* #### Example
|
|
154
160
|
*
|
|
155
161
|
* ```
|
|
156
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
162
|
+
* new milvusClient(MILUVS_ADDRESS).releasePartitions({
|
|
157
163
|
* collection_name: 'my_collection',
|
|
158
164
|
* partition_names: ['my_partition'],
|
|
159
165
|
* });
|
|
@@ -170,22 +176,23 @@ export declare class Partition extends Client {
|
|
|
170
176
|
* To drop a partition will drop all data in this partition and the `_default` partition cannot be dropped.
|
|
171
177
|
*
|
|
172
178
|
* @param data
|
|
173
|
-
* | Property
|
|
174
|
-
* |
|
|
175
|
-
* | collection_name
|
|
176
|
-
* | partition_name
|
|
177
|
-
* | timeout
|
|
178
|
-
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* |
|
|
182
|
-
* |
|
|
183
|
-
* |
|
|
179
|
+
* | Property | Type | Description |
|
|
180
|
+
* | :-- | :-- | :-- |
|
|
181
|
+
* | collection_name | String | Collection name |
|
|
182
|
+
* | partition_name | String | Partition name |
|
|
183
|
+
* | timeout? | number | An optional duration of time in millisecond to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined |
|
|
184
|
+
|
|
185
|
+
*
|
|
186
|
+
* @returns
|
|
187
|
+
* | Property | Description |
|
|
188
|
+
* | :-- | :-- |
|
|
189
|
+
* | error_code | Error code number |
|
|
190
|
+
* | reason | Error cause |
|
|
184
191
|
*
|
|
185
192
|
* #### Example
|
|
186
193
|
*
|
|
187
194
|
* ```
|
|
188
|
-
* new milvusClient(MILUVS_ADDRESS).
|
|
195
|
+
* new milvusClient(MILUVS_ADDRESS).dropPartition({
|
|
189
196
|
* collection_name: 'my_collection',
|
|
190
197
|
* partition_name: 'my_partition',
|
|
191
198
|
* });
|