@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.
- package/dist/milvus/Client.d.ts +0 -8
- package/dist/milvus/Client.js +0 -17
- package/dist/milvus/Client.js.map +1 -1
- package/dist/milvus/Collection.d.ts +225 -131
- package/dist/milvus/Collection.js +262 -155
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/Data.d.ts +129 -125
- package/dist/milvus/Data.js +157 -150
- package/dist/milvus/Data.js.map +1 -1
- package/dist/milvus/MilvusIndex.d.ts +57 -53
- package/dist/milvus/MilvusIndex.js +61 -55
- package/dist/milvus/MilvusIndex.js.map +1 -1
- package/dist/milvus/Partition.d.ts +86 -79
- package/dist/milvus/Partition.js +89 -80
- package/dist/milvus/Partition.js.map +1 -1
- package/dist/milvus/Resource.d.ts +173 -0
- package/dist/milvus/Resource.js +356 -0
- package/dist/milvus/Resource.js.map +1 -0
- package/dist/milvus/User.d.ts +119 -93
- package/dist/milvus/User.js +133 -100
- package/dist/milvus/User.js.map +1 -1
- package/dist/milvus/Utils.d.ts +1 -1
- package/dist/milvus/const/Milvus.d.ts +272 -0
- package/dist/milvus/const/Milvus.js +375 -0
- package/dist/milvus/const/Milvus.js.map +1 -0
- package/dist/milvus/index.d.ts +3 -1
- package/dist/milvus/index.js +8 -5
- 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 +53 -1
- 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/milvus/utils/Format.d.ts +12 -11
- package/dist/milvus/utils/Format.js +27 -18
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/milvus/utils/Validate.d.ts +12 -0
- package/dist/milvus/utils/Validate.js +27 -5
- package/dist/milvus/utils/Validate.js.map +1 -1
- package/dist/proto/proto/common.proto +25 -2
- package/dist/proto/proto/google/protobuf/descriptor.proto +30 -0
- package/dist/proto/proto/milvus.proto +126 -0
- package/dist/proto/proto/msg.proto +107 -0
- package/dist/sdk.json +1 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.js +5 -32
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -10
- package/dist/milvus/types/Search.d.ts +0 -81
- package/dist/milvus/types/Search.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Client } from './Client';
|
|
2
|
-
import { ResStatus, DescribeIndexResponse, GetIndexStateResponse, GetIndexBuildProgressResponse } from './types';
|
|
3
|
-
import { CreateIndexReq, DescribeIndexReq, DropIndexReq, GetIndexBuildProgressReq, GetIndexStateReq } from './types/Index';
|
|
2
|
+
import { CreateIndexReq, DescribeIndexReq, DropIndexReq, GetIndexBuildProgressReq, GetIndexStateReq, ResStatus, DescribeIndexResponse, GetIndexStateResponse, GetIndexBuildProgressResponse } from './types';
|
|
4
3
|
export declare class Index extends Client {
|
|
5
4
|
/**
|
|
6
5
|
* Create an index on a vector field. Note that index building is an async progress.
|
|
7
6
|
*
|
|
8
7
|
* @param data
|
|
9
|
-
* | Property
|
|
10
|
-
* |
|
|
11
|
-
* | collection_name
|
|
12
|
-
* | field_name
|
|
13
|
-
* | index_name
|
|
14
|
-
* | extra_params
|
|
15
|
-
* | timeout
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* |
|
|
20
|
-
* |
|
|
21
|
-
* |
|
|
8
|
+
* | Property | Type | Description |
|
|
9
|
+
* | :-- | :-- | :-- |
|
|
10
|
+
* | collection_name | String | Collection name |
|
|
11
|
+
* | field_name | String | Field name |
|
|
12
|
+
* | index_name | String | Index name is unique in one collection |
|
|
13
|
+
* | extra_params | Object | Parameters: { index_type: string; metric_type: string; params: string; }; |
|
|
14
|
+
* | 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 |
|
|
15
|
+
|
|
16
|
+
*
|
|
17
|
+
* @returns
|
|
18
|
+
* | Property | Description |
|
|
19
|
+
* | :-- | :-- |
|
|
20
|
+
* | error_code | Error code number |
|
|
21
|
+
* | reason | Error cause |
|
|
22
22
|
*
|
|
23
23
|
*
|
|
24
24
|
* #### Example
|
|
@@ -40,14 +40,15 @@ export declare class Index extends Client {
|
|
|
40
40
|
* Show index information. Current release of Milvus only supports showing latest built index.
|
|
41
41
|
*
|
|
42
42
|
* @param data
|
|
43
|
-
* | Property
|
|
44
|
-
* |
|
|
45
|
-
* | collection_name
|
|
46
|
-
* | timeout
|
|
43
|
+
* | Property | Type | Description |
|
|
44
|
+
* | :-- | :-- | :-- |
|
|
45
|
+
* | collection_name | String | Collection name |
|
|
46
|
+
* | 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 |
|
|
47
|
+
|
|
47
48
|
*
|
|
48
|
-
* @
|
|
49
|
+
* @returns
|
|
49
50
|
* | Property | Description |
|
|
50
|
-
* |
|
|
51
|
+
* | :-- | :-- |
|
|
51
52
|
* | status | { error_code: number, reason: string } |
|
|
52
53
|
* | index_descriptions | Index information |
|
|
53
54
|
*
|
|
@@ -65,17 +66,18 @@ export declare class Index extends Client {
|
|
|
65
66
|
* Show index building state.
|
|
66
67
|
*
|
|
67
68
|
* @param data
|
|
68
|
-
* | Property
|
|
69
|
-
* |
|
|
70
|
-
* | collection_name
|
|
71
|
-
* | field_name
|
|
72
|
-
* | timeout
|
|
69
|
+
* | Property | Type | Description |
|
|
70
|
+
* | :-- | :-- | :-- |
|
|
71
|
+
* | collection_name | string | Collection name |
|
|
72
|
+
* | field_name | string | Field name |
|
|
73
|
+
* | 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 |
|
|
74
|
+
|
|
73
75
|
*
|
|
74
|
-
* @
|
|
75
|
-
* | Property
|
|
76
|
-
* |
|
|
77
|
-
* | status
|
|
78
|
-
* | state
|
|
76
|
+
* @returns
|
|
77
|
+
* | Property | Description |
|
|
78
|
+
* | :-- | :-- |
|
|
79
|
+
* | status | { error_code: number, reason: string } |
|
|
80
|
+
* | state | Index building state |
|
|
79
81
|
*
|
|
80
82
|
*
|
|
81
83
|
* #### Example
|
|
@@ -91,18 +93,19 @@ export declare class Index extends Client {
|
|
|
91
93
|
* Show index building progress.
|
|
92
94
|
*
|
|
93
95
|
* @param data
|
|
94
|
-
* | Property
|
|
95
|
-
* |
|
|
96
|
-
* | collection_name
|
|
97
|
-
* | field_name
|
|
98
|
-
* | timeout
|
|
96
|
+
* | Property | Type | Description |
|
|
97
|
+
* | :-- | :-- | :-- |
|
|
98
|
+
* | collection_name | String | Collection name |
|
|
99
|
+
* | field_name | String | Field name |
|
|
100
|
+
* | 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 |
|
|
101
|
+
|
|
99
102
|
*
|
|
100
|
-
* @
|
|
101
|
-
* | Property
|
|
102
|
-
* |
|
|
103
|
-
* | status
|
|
104
|
-
* | indexed_rows
|
|
105
|
-
* | total_rows
|
|
103
|
+
* @returns
|
|
104
|
+
* | Property | Description |
|
|
105
|
+
* | :-- | :-- |
|
|
106
|
+
* | status | { error_code: number, reason: string } |
|
|
107
|
+
* | indexed_rows | Row count that successfully built with index |
|
|
108
|
+
* | total_rows | Total row count |
|
|
106
109
|
*
|
|
107
110
|
*
|
|
108
111
|
*
|
|
@@ -119,17 +122,18 @@ export declare class Index extends Client {
|
|
|
119
122
|
* Drop an index.
|
|
120
123
|
*
|
|
121
124
|
* @param data
|
|
122
|
-
* | Property
|
|
123
|
-
* |
|
|
124
|
-
* | collection_name
|
|
125
|
-
* | field_name
|
|
126
|
-
* | timeout
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* |
|
|
131
|
-
* |
|
|
132
|
-
* |
|
|
125
|
+
* | Property | Type | Description |
|
|
126
|
+
* | :-- | :-- | :-- |
|
|
127
|
+
* | collection_name | String | Collection name |
|
|
128
|
+
* | field_name | String | Field name |
|
|
129
|
+
* | 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 |
|
|
130
|
+
|
|
131
|
+
*
|
|
132
|
+
* @returns
|
|
133
|
+
* | Property | Description |
|
|
134
|
+
* | :-- | :-- |
|
|
135
|
+
* | error_code | Error code number |
|
|
136
|
+
* | reason | Error cause |
|
|
133
137
|
*
|
|
134
138
|
* #### Example
|
|
135
139
|
*
|
|
@@ -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]) {
|
|
@@ -65,6 +65,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
65
65
|
exports.Index = void 0;
|
|
66
66
|
var utils_1 = require("../utils");
|
|
67
67
|
var Client_1 = require("./Client");
|
|
68
|
+
var Validate_1 = require("./utils/Validate");
|
|
68
69
|
var Format_1 = require("./utils/Format");
|
|
69
70
|
var Index = /** @class */ (function (_super) {
|
|
70
71
|
__extends(Index, _super);
|
|
@@ -75,19 +76,20 @@ var Index = /** @class */ (function (_super) {
|
|
|
75
76
|
* Create an index on a vector field. Note that index building is an async progress.
|
|
76
77
|
*
|
|
77
78
|
* @param data
|
|
78
|
-
* | Property
|
|
79
|
-
* |
|
|
80
|
-
* | collection_name
|
|
81
|
-
* | field_name
|
|
82
|
-
* | index_name
|
|
83
|
-
* | extra_params
|
|
84
|
-
* | timeout
|
|
79
|
+
* | Property | Type | Description |
|
|
80
|
+
* | :-- | :-- | :-- |
|
|
81
|
+
* | collection_name | String | Collection name |
|
|
82
|
+
* | field_name | String | Field name |
|
|
83
|
+
* | index_name | String | Index name is unique in one collection |
|
|
84
|
+
* | extra_params | Object | Parameters: { index_type: string; metric_type: string; params: string; }; |
|
|
85
|
+
* | 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 |
|
|
86
|
+
|
|
85
87
|
*
|
|
86
|
-
* @
|
|
87
|
-
* | Property
|
|
88
|
-
* |
|
|
89
|
-
* | error_code
|
|
90
|
-
* | reason
|
|
88
|
+
* @returns
|
|
89
|
+
* | Property | Description |
|
|
90
|
+
* | :-- | :-- |
|
|
91
|
+
* | error_code | Error code number |
|
|
92
|
+
* | reason | Error cause |
|
|
91
93
|
*
|
|
92
94
|
*
|
|
93
95
|
* #### Example
|
|
@@ -110,7 +112,7 @@ var Index = /** @class */ (function (_super) {
|
|
|
110
112
|
return __generator(this, function (_a) {
|
|
111
113
|
switch (_a.label) {
|
|
112
114
|
case 0:
|
|
113
|
-
|
|
115
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
114
116
|
params = __assign(__assign({}, data), { extra_params: (0, Format_1.parseToKeyValue)(data.extra_params) });
|
|
115
117
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'CreateIndex', params, data.timeout)];
|
|
116
118
|
case 1:
|
|
@@ -124,14 +126,15 @@ var Index = /** @class */ (function (_super) {
|
|
|
124
126
|
* Show index information. Current release of Milvus only supports showing latest built index.
|
|
125
127
|
*
|
|
126
128
|
* @param data
|
|
127
|
-
* | Property
|
|
128
|
-
* |
|
|
129
|
-
* | collection_name
|
|
130
|
-
* | timeout
|
|
129
|
+
* | Property | Type | Description |
|
|
130
|
+
* | :-- | :-- | :-- |
|
|
131
|
+
* | collection_name | String | Collection name |
|
|
132
|
+
* | 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 |
|
|
133
|
+
|
|
131
134
|
*
|
|
132
|
-
* @
|
|
135
|
+
* @returns
|
|
133
136
|
* | Property | Description |
|
|
134
|
-
* |
|
|
137
|
+
* | :-- | :-- |
|
|
135
138
|
* | status | { error_code: number, reason: string } |
|
|
136
139
|
* | index_descriptions | Index information |
|
|
137
140
|
*
|
|
@@ -150,7 +153,7 @@ var Index = /** @class */ (function (_super) {
|
|
|
150
153
|
return __generator(this, function (_a) {
|
|
151
154
|
switch (_a.label) {
|
|
152
155
|
case 0:
|
|
153
|
-
|
|
156
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
154
157
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'DescribeIndex', data, data.timeout)];
|
|
155
158
|
case 1:
|
|
156
159
|
promise = _a.sent();
|
|
@@ -163,17 +166,18 @@ var Index = /** @class */ (function (_super) {
|
|
|
163
166
|
* Show index building state.
|
|
164
167
|
*
|
|
165
168
|
* @param data
|
|
166
|
-
* | Property
|
|
167
|
-
* |
|
|
168
|
-
* | collection_name
|
|
169
|
-
* | field_name
|
|
170
|
-
* | timeout
|
|
169
|
+
* | Property | Type | Description |
|
|
170
|
+
* | :-- | :-- | :-- |
|
|
171
|
+
* | collection_name | string | Collection name |
|
|
172
|
+
* | field_name | string | Field name |
|
|
173
|
+
* | 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 |
|
|
174
|
+
|
|
171
175
|
*
|
|
172
|
-
* @
|
|
173
|
-
* | Property
|
|
174
|
-
* |
|
|
175
|
-
* | status
|
|
176
|
-
* | state
|
|
176
|
+
* @returns
|
|
177
|
+
* | Property | Description |
|
|
178
|
+
* | :-- | :-- |
|
|
179
|
+
* | status | { error_code: number, reason: string } |
|
|
180
|
+
* | state | Index building state |
|
|
177
181
|
*
|
|
178
182
|
*
|
|
179
183
|
* #### Example
|
|
@@ -190,7 +194,7 @@ var Index = /** @class */ (function (_super) {
|
|
|
190
194
|
return __generator(this, function (_a) {
|
|
191
195
|
switch (_a.label) {
|
|
192
196
|
case 0:
|
|
193
|
-
|
|
197
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
194
198
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetIndexState', data, data.timeout)];
|
|
195
199
|
case 1:
|
|
196
200
|
promise = _a.sent();
|
|
@@ -203,18 +207,19 @@ var Index = /** @class */ (function (_super) {
|
|
|
203
207
|
* Show index building progress.
|
|
204
208
|
*
|
|
205
209
|
* @param data
|
|
206
|
-
* | Property
|
|
207
|
-
* |
|
|
208
|
-
* | collection_name
|
|
209
|
-
* | field_name
|
|
210
|
-
* | timeout
|
|
210
|
+
* | Property | Type | Description |
|
|
211
|
+
* | :-- | :-- | :-- |
|
|
212
|
+
* | collection_name | String | Collection name |
|
|
213
|
+
* | field_name | String | Field name |
|
|
214
|
+
* | 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 |
|
|
215
|
+
|
|
211
216
|
*
|
|
212
|
-
* @
|
|
213
|
-
* | Property
|
|
214
|
-
* |
|
|
215
|
-
* | status
|
|
216
|
-
* | indexed_rows
|
|
217
|
-
* | total_rows
|
|
217
|
+
* @returns
|
|
218
|
+
* | Property | Description |
|
|
219
|
+
* | :-- | :-- |
|
|
220
|
+
* | status | { error_code: number, reason: string } |
|
|
221
|
+
* | indexed_rows | Row count that successfully built with index |
|
|
222
|
+
* | total_rows | Total row count |
|
|
218
223
|
*
|
|
219
224
|
*
|
|
220
225
|
*
|
|
@@ -232,7 +237,7 @@ var Index = /** @class */ (function (_super) {
|
|
|
232
237
|
return __generator(this, function (_a) {
|
|
233
238
|
switch (_a.label) {
|
|
234
239
|
case 0:
|
|
235
|
-
|
|
240
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
236
241
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetIndexBuildProgress', data, data.timeout)];
|
|
237
242
|
case 1:
|
|
238
243
|
promise = _a.sent();
|
|
@@ -245,17 +250,18 @@ var Index = /** @class */ (function (_super) {
|
|
|
245
250
|
* Drop an index.
|
|
246
251
|
*
|
|
247
252
|
* @param data
|
|
248
|
-
* | Property
|
|
249
|
-
* |
|
|
250
|
-
* | collection_name
|
|
251
|
-
* | field_name
|
|
252
|
-
* | timeout
|
|
253
|
+
* | Property | Type | Description |
|
|
254
|
+
* | :-- | :-- | :-- |
|
|
255
|
+
* | collection_name | String | Collection name |
|
|
256
|
+
* | field_name | String | Field name |
|
|
257
|
+
* | 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 |
|
|
258
|
+
|
|
253
259
|
*
|
|
254
|
-
* @
|
|
255
|
-
* | Property
|
|
256
|
-
* |
|
|
257
|
-
* | error_code
|
|
258
|
-
* | reason
|
|
260
|
+
* @returns
|
|
261
|
+
* | Property | Description |
|
|
262
|
+
* | :-- | :-- |
|
|
263
|
+
* | error_code | Error code number |
|
|
264
|
+
* | reason | Error cause |
|
|
259
265
|
*
|
|
260
266
|
* #### Example
|
|
261
267
|
*
|
|
@@ -271,7 +277,7 @@ var Index = /** @class */ (function (_super) {
|
|
|
271
277
|
return __generator(this, function (_a) {
|
|
272
278
|
switch (_a.label) {
|
|
273
279
|
case 0:
|
|
274
|
-
|
|
280
|
+
(0, Validate_1.checkCollectionName)(data);
|
|
275
281
|
return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'DropIndex', data, data.timeout)];
|
|
276
282
|
case 1:
|
|
277
283
|
promise = _a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MilvusIndex.js","sourceRoot":"","sources":["../../milvus/MilvusIndex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAqC;AACrC,mCAAkC;
|
|
1
|
+
{"version":3,"file":"MilvusIndex.js","sourceRoot":"","sources":["../../milvus/MilvusIndex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAqC;AACrC,mCAAkC;AAClC,6CAAuD;AACvD,yCAAiD;AAajD;IAA2B,yBAAM;IAAjC;;IAwMA,CAAC;IAvMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,2BAAW,GAAjB,UAAkB,IAAoB;;;;;;wBACpC,IAAA,8BAAmB,EAAC,IAAI,CAAC,CAAC;wBAEpB,MAAM,yBACP,IAAI,KACP,YAAY,EAAE,IAAA,wBAAe,EAAC,IAAI,CAAC,YAAY,CAAC,GACjD,CAAC;wBACc,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,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,8BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,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,8BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,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,8BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,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,8BAAmB,EAAC,IAAI,CAAC,CAAC;wBACV,qBAAM,IAAA,iBAAS,EAC7B,IAAI,CAAC,MAAM,EACX,WAAW,EACX,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,OAAO,GAAG,SAKf;wBACD,sBAAO,OAAO,EAAC;;;;KAChB;IACH,YAAC;AAAD,CAAC,AAxMD,CAA2B,eAAM,GAwMhC;AAxMY,sBAAK"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Client } from './Client';
|
|
2
|
-
import { ResStatus, BoolResponse, ShowPartitionsResponse, StatisticsResponse } from './types';
|
|
3
|
-
import { CreatePartitionReq, DropPartitionReq, GetPartitionStatisticsReq, HasPartitionReq, LoadPartitionsReq, ReleasePartitionsReq, ShowPartitionsReq } from './types/Partition';
|
|
2
|
+
import { CreatePartitionReq, DropPartitionReq, GetPartitionStatisticsReq, HasPartitionReq, LoadPartitionsReq, ReleasePartitionsReq, ShowPartitionsReq, ResStatus, BoolResponse, ShowPartitionsResponse, StatisticsResponse } from './types';
|
|
4
3
|
export declare class Partition extends Client {
|
|
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
|
*
|
|
@@ -32,17 +32,18 @@ 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
|
*
|
|
@@ -58,17 +59,18 @@ 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
|
|
@@ -84,18 +86,19 @@ 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
|
|
@@ -109,20 +112,22 @@ 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
|
*
|
|
@@ -138,17 +143,18 @@ 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
|
*
|
|
@@ -170,17 +176,18 @@ 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
|
*
|