@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
package/dist/milvus/Client.d.ts
CHANGED
package/dist/milvus/Client.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = void 0;
|
|
4
|
-
var ErrorReason_1 = require("./const/ErrorReason");
|
|
5
4
|
var Client = /** @class */ (function () {
|
|
6
5
|
function Client(client) {
|
|
7
6
|
this.client = client;
|
|
8
7
|
}
|
|
9
|
-
/**
|
|
10
|
-
* @ignore
|
|
11
|
-
*/
|
|
12
|
-
Client.prototype.checkCollectionName = function (data) {
|
|
13
|
-
if (!data || !data.collection_name) {
|
|
14
|
-
throw new Error(ErrorReason_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @ignore
|
|
19
|
-
*/
|
|
20
|
-
Client.prototype.checkCollectionAndPartitionName = function (data) {
|
|
21
|
-
if (!data || !data.collection_name || !data.partition_name) {
|
|
22
|
-
throw new Error(ErrorReason_1.ERROR_REASONS.COLLECTION_PARTITION_NAME_ARE_REQUIRED);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
8
|
return Client;
|
|
26
9
|
}());
|
|
27
10
|
exports.Client = Client;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../milvus/Client.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../milvus/Client.ts"],"names":[],"mappings":";;;AAAA;IAGE,gBAAY,MAAW;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACH,aAAC;AAAD,CAAC,AAND,IAMC;AANY,wBAAM"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq, GetReplicaReq } from './types/Collection';
|
|
2
|
-
import { BoolResponse, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ResStatus, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse } from './types/Response';
|
|
3
1
|
import { Client } from './Client';
|
|
2
|
+
import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq, GetReplicaReq, RenameCollectionReq, BoolResponse, ResStatus, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse } from './types';
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
4
|
+
* @see [collection operation examples](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
|
|
6
5
|
*/
|
|
7
6
|
export declare class Collection extends Client {
|
|
8
7
|
private readonly _protoRoot;
|
|
@@ -11,17 +10,17 @@ export declare class Collection extends Client {
|
|
|
11
10
|
* Create a collection in Milvus.
|
|
12
11
|
*
|
|
13
12
|
* @param data
|
|
14
|
-
* | Property
|
|
15
|
-
* |
|
|
16
|
-
* | collection_name
|
|
17
|
-
* | description
|
|
18
|
-
* | consistency_level
|
|
19
|
-
* | fields
|
|
20
|
-
* | timeout
|
|
21
|
-
*
|
|
22
|
-
* @
|
|
13
|
+
* | Property | Type | Description |
|
|
14
|
+
* | :-- | :-- | :-- |
|
|
15
|
+
* | collection_name | String | Collection name |
|
|
16
|
+
* | description | String | Collection description |
|
|
17
|
+
* | consistency_level | String | "Strong"(Milvus default) | "Session" | "Bounded"| "Eventually" | "Customized"; |
|
|
18
|
+
* | fields | <a href="https://github.com/milvus-io/milvus-sdk-node/blob/main/milvus/types/Collection.ts#L8" target="_blank">FieldType</a> | Field data |
|
|
19
|
+
* | 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 |
|
|
20
|
+
*
|
|
21
|
+
* @returns
|
|
23
22
|
* | Property | Description |
|
|
24
|
-
* |
|
|
23
|
+
* | :-- | :-- |
|
|
25
24
|
* | error_code | Error code number |
|
|
26
25
|
* | reason | Error cause |
|
|
27
26
|
*
|
|
@@ -55,16 +54,16 @@ export declare class Collection extends Client {
|
|
|
55
54
|
* Check if a collection exists.
|
|
56
55
|
*
|
|
57
56
|
* @param data
|
|
58
|
-
* | Property
|
|
59
|
-
* |
|
|
60
|
-
* | collection_name
|
|
61
|
-
* | timeout
|
|
62
|
-
*
|
|
63
|
-
* @
|
|
64
|
-
* | Property
|
|
65
|
-
* |
|
|
66
|
-
* | status
|
|
67
|
-
* | value
|
|
57
|
+
* | Property | Type | Description |
|
|
58
|
+
* | :-- | :-- | :-- |
|
|
59
|
+
* | collection_name | String | Collection name |
|
|
60
|
+
* | 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 |
|
|
61
|
+
*
|
|
62
|
+
* @returns
|
|
63
|
+
* | Property | Description |
|
|
64
|
+
* | :-- | :-- |
|
|
65
|
+
* | status | { error_code: number, reason: string } |
|
|
66
|
+
* | value | `true` or `false` |
|
|
68
67
|
|
|
69
68
|
*
|
|
70
69
|
* #### Example
|
|
@@ -80,17 +79,18 @@ export declare class Collection extends Client {
|
|
|
80
79
|
* List all collections or get collection loading status.
|
|
81
80
|
*
|
|
82
81
|
* @param data
|
|
83
|
-
* | Property
|
|
84
|
-
* |
|
|
85
|
-
* | type(optional)
|
|
86
|
-
* | collection_names(optional)
|
|
87
|
-
* | timeout
|
|
82
|
+
* | Property | Type | Description |
|
|
83
|
+
* | :-- | :-- | :-- |
|
|
84
|
+
* | type(optional) | enum | All -> 0, Loaded -> 1 |
|
|
85
|
+
* | collection_names(optional) | String[] | If `type = Loaded`, Milvus will return `collection_names inMemory_percentages` |
|
|
86
|
+
* | 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 |
|
|
87
|
+
|
|
88
88
|
*
|
|
89
|
-
* @
|
|
90
|
-
*
|
|
91
|
-
* |
|
|
92
|
-
* | status
|
|
93
|
-
* | data
|
|
89
|
+
* @returns
|
|
90
|
+
* | Property | Description |
|
|
91
|
+
* | :-- | :-- |
|
|
92
|
+
* | status | { error_code: number, reason: string } |
|
|
93
|
+
* | data | Contains collection name, ID , timestamp (UTC created time), and loadedPercentage (100 means loaded) |
|
|
94
94
|
*
|
|
95
95
|
*
|
|
96
96
|
* #### Example
|
|
@@ -104,17 +104,17 @@ export declare class Collection extends Client {
|
|
|
104
104
|
* Show the details of a collection, e.g. name, schema.
|
|
105
105
|
*
|
|
106
106
|
* @param data
|
|
107
|
-
* | Property
|
|
108
|
-
* |
|
|
109
|
-
* | collection_name
|
|
110
|
-
* | timeout
|
|
107
|
+
* | Property | Type | Description |
|
|
108
|
+
* | :-- | :-- | :-- |
|
|
109
|
+
* | collection_name | String | Collection name |
|
|
110
|
+
* | 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 |
|
|
111
111
|
*
|
|
112
|
-
* @
|
|
113
|
-
*
|
|
114
|
-
* |
|
|
115
|
-
* | status
|
|
116
|
-
* | schema
|
|
117
|
-
* | collectionID |
|
|
112
|
+
* @returns
|
|
113
|
+
* | Property | Description |
|
|
114
|
+
* | :-- | :-- |
|
|
115
|
+
* | status | { error_code: number, reason: string } |
|
|
116
|
+
* | schema | Information of all fields in this collection |
|
|
117
|
+
* | collectionID | Collection ID |
|
|
118
118
|
*
|
|
119
119
|
*
|
|
120
120
|
* #### Example
|
|
@@ -130,17 +130,17 @@ export declare class Collection extends Client {
|
|
|
130
130
|
* Show the statistics information of a collection.
|
|
131
131
|
*
|
|
132
132
|
* @param data
|
|
133
|
-
* | Property
|
|
134
|
-
* |
|
|
135
|
-
* | collection_name
|
|
136
|
-
* | timeout
|
|
133
|
+
* | Property | Type | Description |
|
|
134
|
+
* | :-- | :-- | :-- |
|
|
135
|
+
* | collection_name | String | Collection name |
|
|
136
|
+
* | 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 |
|
|
137
137
|
*
|
|
138
|
-
* @
|
|
139
|
-
*
|
|
140
|
-
* |
|
|
141
|
-
* | status
|
|
142
|
-
* | stats
|
|
143
|
-
* | data
|
|
138
|
+
* @returns
|
|
139
|
+
* | Property | Description |
|
|
140
|
+
* | :-- | :-- |
|
|
141
|
+
* | status | { error_code: number, reason: string } |
|
|
142
|
+
* | stats | [{key: string, value: string}] |
|
|
143
|
+
* | data | Transform **stats** to { row_count: 0 } |
|
|
144
144
|
*
|
|
145
145
|
*
|
|
146
146
|
* #### Example
|
|
@@ -157,17 +157,18 @@ export declare class Collection extends Client {
|
|
|
157
157
|
* It's async function, but we can use showCollections to check loading status.
|
|
158
158
|
*
|
|
159
159
|
* @param data
|
|
160
|
-
* | Property
|
|
161
|
-
* |
|
|
162
|
-
* | collection_name | String |
|
|
163
|
-
* | replica_number?
|
|
164
|
-
* |
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* |
|
|
169
|
-
* |
|
|
170
|
-
* |
|
|
160
|
+
* | Property | Type | Description |
|
|
161
|
+
* | :--- | :-- | :-- |
|
|
162
|
+
* | collection_name | String | Collection name |
|
|
163
|
+
* | replica_number? | number | replica number |
|
|
164
|
+
* | resource_groups? | String[] | resource group names |
|
|
165
|
+
* | 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 |
|
|
166
|
+
*
|
|
167
|
+
* @returns
|
|
168
|
+
* | Property | Description |
|
|
169
|
+
* | :-- | :-- |
|
|
170
|
+
* | error_code | Error code number |
|
|
171
|
+
* | reason | Error cause |
|
|
171
172
|
*
|
|
172
173
|
* #### Example
|
|
173
174
|
*
|
|
@@ -183,16 +184,18 @@ export declare class Collection extends Client {
|
|
|
183
184
|
* Help to ensure this collection is loaded.
|
|
184
185
|
*
|
|
185
186
|
* @param data
|
|
186
|
-
* | Property
|
|
187
|
-
* |
|
|
188
|
-
* | collection_name
|
|
189
|
-
* |
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* |
|
|
195
|
-
* |
|
|
187
|
+
* | Property | Type | Description |
|
|
188
|
+
* | :--- | :-- | :-- |
|
|
189
|
+
* | collection_name | String | Collection name |
|
|
190
|
+
* | replica_number? | number | replica number |
|
|
191
|
+
* | resource_groups? | String[] | resource group |
|
|
192
|
+
* | 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 |
|
|
193
|
+
*
|
|
194
|
+
* @returns
|
|
195
|
+
* | Property | Description |
|
|
196
|
+
* | :-- | :-- |
|
|
197
|
+
* | error_code | Error code number |
|
|
198
|
+
* | reason | Error cause |
|
|
196
199
|
*
|
|
197
200
|
* #### Example
|
|
198
201
|
*
|
|
@@ -208,16 +211,16 @@ export declare class Collection extends Client {
|
|
|
208
211
|
* Note that you cannot search while the corresponding collection is unloaded.
|
|
209
212
|
*
|
|
210
213
|
* @param data
|
|
211
|
-
* | Property
|
|
212
|
-
* |
|
|
213
|
-
* | collection_name
|
|
214
|
-
* | timeout
|
|
214
|
+
* | Property | Type | Description |
|
|
215
|
+
* | :-- | :-- | :-- |
|
|
216
|
+
* | collection_name | String | Collection name |
|
|
217
|
+
* | 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
218
|
*
|
|
216
|
-
* @
|
|
217
|
-
* | Property
|
|
218
|
-
* |
|
|
219
|
-
* | error_code
|
|
220
|
-
* | reason
|
|
219
|
+
* @returns
|
|
220
|
+
* | Property | Description |
|
|
221
|
+
* | :-- | :-- |
|
|
222
|
+
* | error_code | Error code number |
|
|
223
|
+
* | reason | Error cause |
|
|
221
224
|
*
|
|
222
225
|
* #### Example
|
|
223
226
|
*
|
|
@@ -228,20 +231,46 @@ export declare class Collection extends Client {
|
|
|
228
231
|
* ```
|
|
229
232
|
*/
|
|
230
233
|
releaseCollection(data: ReleaseLoadCollectionReq): Promise<ResStatus>;
|
|
234
|
+
/**
|
|
235
|
+
* Rename a collection
|
|
236
|
+
*
|
|
237
|
+
* @param data
|
|
238
|
+
* | Property | Type | Description |
|
|
239
|
+
* | :-- | :-- | :-- |
|
|
240
|
+
* | collection_name | String | old collection name |
|
|
241
|
+
* | new_collection_name | String | new collection name |
|
|
242
|
+
* | 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 |
|
|
243
|
+
*
|
|
244
|
+
* @returns
|
|
245
|
+
* | Property | Description |
|
|
246
|
+
* | :-- | :-- |
|
|
247
|
+
* | error_code | Error code number |
|
|
248
|
+
* | reason | Error cause |
|
|
249
|
+
*
|
|
250
|
+
* #### Example
|
|
251
|
+
*
|
|
252
|
+
* ```
|
|
253
|
+
* new milvusClient(MILUVS_ADDRESS).collectionManager.renameCollection({
|
|
254
|
+
* collection_name: 'my_collection',
|
|
255
|
+
* new_collection_name: 'my_new_collection'
|
|
256
|
+
* });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
renameCollection(data: RenameCollectionReq): Promise<ResStatus>;
|
|
231
260
|
/**
|
|
232
261
|
* Drop a collection. Note that this drops all data in the collection.
|
|
233
262
|
*
|
|
234
263
|
* @param data
|
|
235
|
-
* | Property
|
|
236
|
-
* |
|
|
237
|
-
* | collection_name
|
|
238
|
-
* | timeout
|
|
264
|
+
* | Property | Type | Description |
|
|
265
|
+
* | :-- | :-- | :-- |
|
|
266
|
+
* | collection_name | String | Collection name |
|
|
267
|
+
* | 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. |
|
|
239
268
|
*
|
|
240
|
-
* @
|
|
241
|
-
* | Property
|
|
242
|
-
* |
|
|
243
|
-
* | error_code
|
|
244
|
-
* | reason
|
|
269
|
+
* @returns
|
|
270
|
+
* | Property | Description |
|
|
271
|
+
* | :-- | :-- |
|
|
272
|
+
* | error_code | Error code number |
|
|
273
|
+
* | reason | Error cause |
|
|
245
274
|
*
|
|
246
275
|
* #### Example
|
|
247
276
|
*
|
|
@@ -253,35 +282,100 @@ export declare class Collection extends Client {
|
|
|
253
282
|
*/
|
|
254
283
|
dropCollection(data: DropCollectionReq): Promise<ResStatus>;
|
|
255
284
|
/**
|
|
256
|
-
* @ignore
|
|
257
285
|
* Create collection alias, then you can use alias instead of collection_name when you do vector search
|
|
286
|
+
*
|
|
258
287
|
* @param data
|
|
288
|
+
* | Property | Type | Description |
|
|
289
|
+
* | :-- | :-- | :-- |
|
|
290
|
+
* | alias | String | alias name |
|
|
291
|
+
* | collection_name | String | Collection name |
|
|
292
|
+
* | 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. |
|
|
293
|
+
*
|
|
294
|
+
* @returns
|
|
295
|
+
* | Property | Description |
|
|
296
|
+
* | :-- | :-- |
|
|
297
|
+
* | error_code | Error code number |
|
|
298
|
+
* | reason | Error cause |
|
|
299
|
+
*
|
|
300
|
+
*
|
|
301
|
+
* #### Example
|
|
302
|
+
*
|
|
303
|
+
* ```
|
|
304
|
+
* new milvusClient(MILUVS_ADDRESS).collectionManager.createAlias({
|
|
305
|
+
* alias: 'my_collection_alis',
|
|
306
|
+
* collection_name: 'my_collection',
|
|
307
|
+
* });
|
|
308
|
+
* ```
|
|
259
309
|
*/
|
|
260
310
|
createAlias(data: CreateAliasReq): Promise<ResStatus>;
|
|
261
311
|
/**
|
|
262
|
-
*
|
|
312
|
+
* Drop a collection alias
|
|
313
|
+
*
|
|
263
314
|
* @param data
|
|
315
|
+
* | Property | Type | Description |
|
|
316
|
+
* | :-- | :-- | :-- |
|
|
317
|
+
* | alias | String | alias name |
|
|
318
|
+
* | collection_name | String | Collection name |
|
|
319
|
+
* | 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. |
|
|
320
|
+
*
|
|
321
|
+
* @returns
|
|
322
|
+
* | Property | Description |
|
|
323
|
+
* | :-- | :-- |
|
|
324
|
+
* | error_code | Error code number |
|
|
325
|
+
* | reason | Error cause |
|
|
326
|
+
*
|
|
327
|
+
*
|
|
328
|
+
* #### Example
|
|
329
|
+
*
|
|
330
|
+
* ```
|
|
331
|
+
* new milvusClient(MILUVS_ADDRESS).collectionManager.dropAlias({
|
|
332
|
+
* alias: 'my_collection_alis',
|
|
333
|
+
* collection_name: 'my_collection',
|
|
334
|
+
* });
|
|
335
|
+
* ```
|
|
264
336
|
*/
|
|
265
337
|
dropAlias(data: DropAliasReq): Promise<ResStatus>;
|
|
266
338
|
/**
|
|
267
|
-
*
|
|
339
|
+
* alter a collection alias
|
|
340
|
+
*
|
|
268
341
|
* @param data
|
|
342
|
+
* | Property | Type | Description |
|
|
343
|
+
* | :-- | :-- | :-- |
|
|
344
|
+
* | alias | String | alias name |
|
|
345
|
+
* | collection_name | String | Collection name |
|
|
346
|
+
* | 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. |
|
|
347
|
+
*
|
|
348
|
+
* @returns
|
|
349
|
+
* | Property | Description |
|
|
350
|
+
* | :-- | :-- |
|
|
351
|
+
* | error_code | Error code number |
|
|
352
|
+
* | reason | Error cause |
|
|
353
|
+
*
|
|
354
|
+
*
|
|
355
|
+
* #### Example
|
|
356
|
+
*
|
|
357
|
+
* ```
|
|
358
|
+
* new milvusClient(MILUVS_ADDRESS).collectionManager.alterAlais({
|
|
359
|
+
* alias: 'my_collection_alis',
|
|
360
|
+
* collection_name: 'my_collection',
|
|
361
|
+
* });
|
|
362
|
+
* ```
|
|
269
363
|
*/
|
|
270
364
|
alterAlias(data: AlterAliasReq): Promise<ResStatus>;
|
|
271
365
|
/**
|
|
272
366
|
* Do compaction for the collection.
|
|
273
367
|
*
|
|
274
368
|
* @param data
|
|
275
|
-
* | Property
|
|
276
|
-
* |
|
|
277
|
-
* | collection_name
|
|
278
|
-
* | timeout
|
|
369
|
+
* | Property | Type | Description |
|
|
370
|
+
* | :-- | :-- | :-- |
|
|
371
|
+
* | collection_name | String | The collection name to compact |
|
|
372
|
+
* | 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 |
|
|
279
373
|
*
|
|
280
|
-
* @
|
|
281
|
-
* | Property
|
|
282
|
-
* |
|
|
283
|
-
* | status
|
|
284
|
-
* | compactionID
|
|
374
|
+
* @returns
|
|
375
|
+
* | Property | Description |
|
|
376
|
+
* | :-- | :-- |
|
|
377
|
+
* | status | { error_code: number, reason: string } |
|
|
378
|
+
* | compactionID | compaction ID |
|
|
285
379
|
*
|
|
286
380
|
* #### Example
|
|
287
381
|
*
|
|
@@ -296,16 +390,16 @@ export declare class Collection extends Client {
|
|
|
296
390
|
* Get compaction states of a targeted compaction id
|
|
297
391
|
*
|
|
298
392
|
* @param data
|
|
299
|
-
* | Property
|
|
300
|
-
* |
|
|
301
|
-
* | compactionID
|
|
302
|
-
* | timeout
|
|
393
|
+
* | Property | Type | Description |
|
|
394
|
+
* | :-- | :-- | :-- |
|
|
395
|
+
* | compactionID | number or string | the id returned by compact |
|
|
396
|
+
* | 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 |
|
|
303
397
|
*
|
|
304
|
-
* @
|
|
305
|
-
* | Property
|
|
306
|
-
* |
|
|
307
|
-
* | status
|
|
308
|
-
* | state
|
|
398
|
+
* @returns
|
|
399
|
+
* | Property | Description |
|
|
400
|
+
* | :-- | :-- |
|
|
401
|
+
* | status | { error_code: number, reason: string } |
|
|
402
|
+
* | state | the state of the compaction |
|
|
309
403
|
*
|
|
310
404
|
* #### Example
|
|
311
405
|
*
|
|
@@ -320,16 +414,16 @@ export declare class Collection extends Client {
|
|
|
320
414
|
* Get compaction states of a targeted compaction id
|
|
321
415
|
*
|
|
322
416
|
* @param data
|
|
323
|
-
* | Property
|
|
324
|
-
* |
|
|
325
|
-
* | compactionID
|
|
326
|
-
* | timeout
|
|
417
|
+
* | Property | Type | Description |
|
|
418
|
+
* | :-- | :-- | :-- |
|
|
419
|
+
* | compactionID | number or string | the id returned by compact |
|
|
420
|
+
* | 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 |
|
|
327
421
|
*
|
|
328
|
-
* @
|
|
329
|
-
* | Property
|
|
330
|
-
* |
|
|
331
|
-
* | status
|
|
332
|
-
* | state
|
|
422
|
+
* @returns
|
|
423
|
+
* | Property | Description |
|
|
424
|
+
* | :-- | :-- |
|
|
425
|
+
* | status | { error_code: number, reason: string } |
|
|
426
|
+
* | state | the state of the compaction |
|
|
333
427
|
*
|
|
334
428
|
* #### Example
|
|
335
429
|
*
|
|
@@ -344,15 +438,15 @@ export declare class Collection extends Client {
|
|
|
344
438
|
* Get replicas
|
|
345
439
|
*
|
|
346
440
|
* @param data
|
|
347
|
-
* | Property
|
|
348
|
-
* |
|
|
349
|
-
* | collectionID
|
|
350
|
-
* | timeout
|
|
351
|
-
*
|
|
352
|
-
* @
|
|
353
|
-
* | Property
|
|
354
|
-
* |
|
|
355
|
-
* | status
|
|
441
|
+
* | Property | Type | Description |
|
|
442
|
+
* | :-- | :-- | :-- |
|
|
443
|
+
* | collectionID | number or string | the id returned by compact |
|
|
444
|
+
* | 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 |
|
|
445
|
+
*
|
|
446
|
+
* @returns
|
|
447
|
+
* | Property | Description |
|
|
448
|
+
* | :-- | :-- |
|
|
449
|
+
* | status | { error_code: number, reason: string } |
|
|
356
450
|
* | ReplicaInfo[] | replica info array |
|
|
357
451
|
*
|
|
358
452
|
* #### Example
|