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