@zilliz/milvus2-sdk-node 2.6.8 → 2.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +24 -196
  2. package/dist/milvus/HttpClient.d.ts +39 -0
  3. package/dist/milvus/HttpClient.js +1 -1
  4. package/dist/milvus/HttpClient.js.map +1 -1
  5. package/dist/milvus/const/client.d.ts +3 -1
  6. package/dist/milvus/const/client.js +2 -0
  7. package/dist/milvus/const/client.js.map +1 -1
  8. package/dist/milvus/const/error.d.ts +2 -0
  9. package/dist/milvus/const/error.js +2 -0
  10. package/dist/milvus/const/error.js.map +1 -1
  11. package/dist/milvus/grpc/BaseClient.js +1 -1
  12. package/dist/milvus/grpc/Collection.d.ts +86 -1
  13. package/dist/milvus/grpc/Collection.js +138 -0
  14. package/dist/milvus/grpc/Collection.js.map +1 -1
  15. package/dist/milvus/grpc/Data.js +6 -5
  16. package/dist/milvus/grpc/Data.js.map +1 -1
  17. package/dist/milvus/grpc/GrpcClient.js +2 -0
  18. package/dist/milvus/grpc/GrpcClient.js.map +1 -1
  19. package/dist/milvus/http/Collection.d.ts +9 -1
  20. package/dist/milvus/http/Collection.js +48 -0
  21. package/dist/milvus/http/Collection.js.map +1 -1
  22. package/dist/milvus/http/Database.d.ts +42 -0
  23. package/dist/milvus/http/Database.js +71 -0
  24. package/dist/milvus/http/Database.js.map +1 -0
  25. package/dist/milvus/http/MilvusIndex.d.ts +3 -1
  26. package/dist/milvus/http/MilvusIndex.js +12 -0
  27. package/dist/milvus/http/MilvusIndex.js.map +1 -1
  28. package/dist/milvus/http/Vector.js +1 -1
  29. package/dist/milvus/http/Vector.js.map +1 -1
  30. package/dist/milvus/http/index.d.ts +1 -0
  31. package/dist/milvus/http/index.js +1 -0
  32. package/dist/milvus/http/index.js.map +1 -1
  33. package/dist/milvus/proto-json/milvus.base.d.ts +34 -514
  34. package/dist/milvus/proto-json/milvus.base.js +36 -522
  35. package/dist/milvus/proto-json/milvus.base.js.map +1 -1
  36. package/dist/milvus/proto-json/milvus.d.ts +34 -514
  37. package/dist/milvus/proto-json/milvus.js +36 -522
  38. package/dist/milvus/proto-json/milvus.js.map +1 -1
  39. package/dist/milvus/proto-json/schema.base.d.ts +6 -44
  40. package/dist/milvus/proto-json/schema.base.js +8 -46
  41. package/dist/milvus/proto-json/schema.base.js.map +1 -1
  42. package/dist/milvus/types/Collection.d.ts +16 -0
  43. package/dist/milvus/types/Common.d.ts +2 -0
  44. package/dist/milvus/types/Http.d.ts +99 -0
  45. package/dist/milvus/types/Search.d.ts +4 -2
  46. package/dist/milvus/utils/Function.d.ts +18 -4
  47. package/dist/milvus/utils/Function.js +56 -7
  48. package/dist/milvus/utils/Function.js.map +1 -1
  49. package/dist/milvus/utils/Grpc.d.ts +6 -0
  50. package/dist/milvus/utils/Grpc.js +29 -1
  51. package/dist/milvus/utils/Grpc.js.map +1 -1
  52. package/dist/milvus/utils/Schema.d.ts +12 -1
  53. package/dist/milvus/utils/Schema.js +21 -1
  54. package/dist/milvus/utils/Schema.js.map +1 -1
  55. package/dist/milvus/utils/Search.d.ts +16 -0
  56. package/dist/milvus/utils/Search.js +47 -3
  57. package/dist/milvus/utils/Search.js.map +1 -1
  58. package/dist/sdk.json +1 -1
  59. package/package.json +2 -2
package/README.md CHANGED
@@ -7,6 +7,12 @@
7
7
 
8
8
  The official [Milvus](https://github.com/milvus-io/milvus) client for Node.js.
9
9
 
10
+ ## 📚 Documentation
11
+
12
+ **👉 [View Full Documentation](https://milvus-io.github.io/milvus-sdk-node)**
13
+
14
+ For complete documentation, API reference, guides, and examples, please visit our documentation site.
15
+
10
16
  ## Compatibility
11
17
 
12
18
  The following table shows the recommended `@zilliz/milvus2-sdk-node` versions for different Milvus versions:
@@ -27,215 +33,37 @@ The following table shows the recommended `@zilliz/milvus2-sdk-node` versions fo
27
33
 
28
34
  ## Installation
29
35
 
30
- You can use npm (Node package manager) or Yarn to install the `@zilliz/milvus2-sdk-node` dependency in your project:
31
-
32
36
  ```shell
33
37
  npm install @zilliz/milvus2-sdk-node
34
- # or ...
38
+ # or
35
39
  yarn add @zilliz/milvus2-sdk-node
36
40
  ```
37
41
 
38
- ## Milvus TLS Guide
39
-
40
- Please refer to [this doc](https://github.com/milvus-io/milvus-sdk-node/tree/main/test/cert).
41
-
42
- ## Code Examples
43
-
44
- This table organizes the examples by technology, providing a brief description and the directory where each example can be found.
45
- | Technology | Example | Directory |
46
- |------------------|--------------------------------------------|-----------------------------------|
47
- | Next.js | Next.js app example | [examples/nextjs](./examples/nextjs) |
48
- | Node.js | Basic Node.js examples for Milvus | [examples/milvus](./examples/milvus) |
49
- | Langchain.js | Basic Langchain.js example | [examples/langchain](./examples/LangChain) |
50
-
51
- ## Basic usages
52
-
53
- This guide will show you how to set up a simple application using Node.js and Milvus. Its scope is only how to set up the node.js client and perform the simple CRUD operations. For more in-depth coverage, see the [Milvus official website](https://milvus.io/).
54
-
55
- ### Start a Milvus server
56
-
57
- ```shell
58
- # Start Milvus with script
59
- wget https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
60
- bash standalone_embed.sh start
61
- ```
62
-
63
- ### Connect to Milvus
64
-
65
- Create a new app.js file and add the following code to try out some basic vector operations using the Milvus node.js client. More details on the [API reference](https://milvus.io/api-reference/node/v2.3.x/Client/MilvusClient.md).
66
-
67
- ```javascript
68
- import { MilvusClient, DataType } from '@zilliz/milvus2-sdk-node';
69
-
70
- const address = 'your-milvus-ip-with-port';
71
- const username = 'your-milvus-username'; // optional username
72
- const password = 'your-milvus-password'; // optional password
73
-
74
- // connect to milvus
75
- const client = new MilvusClient({ address, username, password });
76
- // wait until connecting finished
77
- await client.connectPromise;
78
- ```
79
-
80
- ### Create a collection
81
-
82
- In Milvus, the concept of the collection is like the table in traditional RDBMS, eg: mysql or postgres. Before creating a collection, you need to define a schema, then just call the `createCollection` method.
83
-
84
- #### Define schema for collection
85
-
86
- A schema defines the fields of a collection, such as the names and data types of the fields that make up the vectors. More details of how to define schema and advanced usage can be found in [API reference](https://milvus.io/api-reference/node/v2.3.x/Collection/createCollection.md).
42
+ ## Quick Start
87
43
 
88
44
  ```javascript
89
- // define schema
90
- const collection_name = `hello_milvus`;
91
- const dim = 128;
92
- const schema = [
93
- {
94
- name: 'age',
95
- description: 'ID field',
96
- data_type: DataType.Int64,
97
- is_primary_key: true,
98
- autoID: true,
99
- },
100
- {
101
- name: 'vector',
102
- description: 'Vector field',
103
- data_type: DataType.FloatVector,
104
- dim: 8,
105
- },
106
- { name: 'height', description: 'int64 field', data_type: DataType.Int64 },
107
- {
108
- name: 'name',
109
- description: 'VarChar field',
110
- data_type: DataType.VarChar,
111
- max_length: 128,
112
- },
113
- ],
114
- ```
45
+ import { MilvusClient } from '@zilliz/milvus2-sdk-node';
115
46
 
116
- #### Create the collection
117
-
118
- ```javascript
119
- await client.createCollection({
120
- collection_name,
121
- fields: schema,
47
+ const client = new MilvusClient({
48
+ address: 'localhost:19530',
122
49
  });
123
- ```
124
-
125
- ### Prepare data
126
50
 
127
- The data format utilized by the Milvus Node SDK comprises an array of objects. In each object, the key should correspond to the field `name` defined in the schema. The value type for the key should match the `data_type` specified in the field of the schema.
128
-
129
- ```javascript
130
- const fields_data = [
131
- {
132
- name: 'zlnmh',
133
- vector: [
134
- 0.11878310581111173, 0.9694947902934701, 0.16443679307243175,
135
- 0.5484226189097237, 0.9839246709011924, 0.5178387104937776,
136
- 0.8716926129208069, 0.5616972243831446,
137
- ],
138
- height: 20405,
139
- },
140
- {
141
- name: '5lr9y',
142
- vector: [
143
- 0.9992090731236536, 0.8248790611809487, 0.8660083940881405,
144
- 0.09946359318481224, 0.6790698063908669, 0.5013786801063624,
145
- 0.795311915725105, 0.9183033261617566,
146
- ],
147
- height: 93773,
148
- },
149
- {
150
- name: 'nes0j',
151
- vector: [
152
- 0.8761291569818763, 0.07127366044153227, 0.775648976160332,
153
- 0.5619757601304878, 0.6076543120476996, 0.8373907516027586,
154
- 0.8556140171597648, 0.4043893119391049,
155
- ],
156
- height: 85122,
157
- },
158
- ];
159
- ```
160
-
161
- ### Insert data into collection
162
-
163
- Once we have the data, you can insert data into the collection by calling the `insert` method.
164
-
165
- ```javascript
166
- await client.insert({
167
- collection_name,
168
- data,
169
- });
170
- ```
171
-
172
- ### Create index
173
-
174
- By creating an index and loading the collection into memory, you can improve the performance of search and retrieval operations in Milvus, making it faster and more efficient to work with large-scale datasets.
175
-
176
- ```javascript
177
- // create index
178
- await client.createIndex({
179
- collection_name, // required
180
- field_name: 'vector', // optional if you are using milvus v2.2.9+
181
- index_name: 'myindex', // optional
182
- index_type: 'HNSW', // optional if you are using milvus v2.2.9+
183
- params: { efConstruction: 10, M: 4 }, // optional if you are using milvus v2.2.9+
184
- metric_type: 'L2', // optional if you are using milvus v2.2.9+
185
- });
186
- ```
187
-
188
- Milvus supports [several different types of indexes](https://milvus.io/docs/index.md), each of which is optimized for different use cases and data distributions. Some of the most commonly used index types in Milvus include HNSW, IVF_FLAT, IVF_SQ8, IVF_PQ. When creating an index in Milvus, you must choose an appropriate index type based on your specific use case and data distribution.
189
-
190
- ### Load collection
191
-
192
- When you create a collection in Milvus, the collection data is initially stored on disk, and it is not immediately available for search and retrieval. In order to search or retrieve data from the collection, you must first load the collection into memory using the `loadCollectionSync` method.
193
-
194
- ```javascript
195
- // load collection
196
- await client.loadCollectionSync({
197
- collection_name,
198
- });
199
- ```
200
-
201
- ### vector search
202
-
203
- Now you can perform vector search on your collection.
204
-
205
- ```javascript
206
- // get the search vector
207
- const searchVector = fields_data[0].vector;
208
-
209
- // Perform a vector search on the collection
210
- const res = await client.search({
211
- // required
212
- collection_name, // required, the collection name
213
- data: searchVector, // required, vector used to compare other vectors in milvus
214
- // optionals
215
- filter: 'height > 0', // optional, filter expression
216
- params: { nprobe: 64 }, // optional, specify the search parameters
217
- limit: 10, // optional, specify the number of nearest neighbors to return
218
- output_fields: ['height', 'name'], // optional, specify the fields to return in the search results,
219
- });
51
+ await client.connectPromise;
220
52
  ```
221
53
 
222
- ## Next Steps
223
-
224
- - [Attu, Using GUI to manage Milvus](https://github.com/zilliztech/attu)
225
- ![<img src="[./.github/images/screenshot.png](https://github.com/zilliztech/attu/raw/main/.github/images/screenshot.png)" width="800" alt="attu home view" />
226
- ](https://github.com/zilliztech/attu/raw/main/.github/images/screenshot.png)
227
-
228
- ## other useful links
54
+ For more examples and detailed usage, see the [documentation](https://milvus-io.github.io/milvus-sdk-node).
229
55
 
230
- - [What is Milvus](https://milvus.io/)
231
- - [Milvus Node SDK API reference](https://milvus.io/api-reference/node/v2.3.x/About.md)
232
- - [Feder, anns index visualization tool](https://github.com/zilliztech/feder)
56
+ ## Contributing
233
57
 
234
- ## How to contribute
235
-
236
- 1. yarn install
58
+ 1. `yarn install`
237
59
  2. Fetch milvus proto
238
- 1. `git submodule init` (if this is your first time)
239
- 2. `git submodule update --remote`
240
- 3. Add feature in milvus folder.
60
+ - `git submodule init` (if this is your first time)
61
+ - `git submodule update --remote`
62
+ 3. Add feature in milvus folder
241
63
  4. Run test `yarn test -- test/Your-test-for-your-feature.spec.ts`
64
+
65
+ ## Links
66
+
67
+ - [Documentation](https://milvus-io.github.io/milvus-sdk-node)
68
+ - [Milvus Official Website](https://milvus.io/)
69
+ - [GitHub Repository](https://github.com/milvus-io/milvus-sdk-node)
@@ -117,6 +117,8 @@ declare const HttpClient_base: {
117
117
  dropIndex(params: import("./types").HttpIndexBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
118
118
  describeIndex(params: import("./types").HttpIndexBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpIndexDescribeResponse>;
119
119
  listIndexes(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
120
+ alterIndexProperties(params: import("./types").HttpIndexAlterPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpIndexAlterPropertiesResponse>;
121
+ dropIndexProperties(params: import("./types").HttpIndexDropPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpIndexDropPropertiesResponse>;
120
122
  config: HttpClientConfig;
121
123
  readonly baseURL: string;
122
124
  readonly authorization: string;
@@ -227,13 +229,50 @@ declare const HttpClient_base: {
227
229
  createCollection(data: import("./types").HttpCollectionCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
228
230
  describeCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionDescribeResponse>;
229
231
  dropCollection(data: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
232
+ addCollectionField(params: import("./types").HttpCollectionAddFieldReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionAddFieldResponse>;
233
+ alterCollectionProperties(params: import("./types").HttpCollectionAlterPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionAlterPropertiesResponse>;
234
+ alterCollectionFieldProperties(params: import("./types").HttpCollectionAlterFieldPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionAlterFieldPropertiesResponse>;
235
+ dropCollectionProperties(params: import("./types").HttpCollectionDropPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionDropPropertiesResponse>;
230
236
  listCollections(params?: import("./types").HttpCollectionListReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionListResponse>;
231
237
  hasCollection(params: Required<import("./types").HttpBaseReq>, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionHasResponse>;
232
238
  renameCollection(params: import("./types").HttpCollectionRenameReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
233
239
  getCollectionStatistics(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionStatisticsResponse>;
240
+ flushCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionFlushResponse>;
234
241
  loadCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
235
242
  releaseCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
236
243
  getCollectionLoadState(params: import("./types").HttpCollectionLoadStateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionLoadStateResponse>;
244
+ compactCollection(params: import("./types").HttpCollectionCompactReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionCompactResponse>;
245
+ getCompactionState(params: import("./types").HttpCollectionGetCompactionStateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionGetCompactionStateResponse>;
246
+ refreshLoad(params: import("./types").HttpCollectionRefreshLoadReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
247
+ config: HttpClientConfig;
248
+ readonly baseURL: string;
249
+ readonly authorization: string;
250
+ readonly database: string;
251
+ readonly timeout: number;
252
+ readonly headers: {
253
+ Authorization: string;
254
+ Accept: string;
255
+ ContentType: string;
256
+ 'Accept-Type-Allow-Int64': string;
257
+ };
258
+ readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
259
+ /**
260
+ * Handles HTTP response and throws HttpError if response is not ok.
261
+ * @internal
262
+ */
263
+ _handleResponse<T>(response: Response, url: string): Promise<T>;
264
+ POST<T_1>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
265
+ GET<T_2>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_2>;
266
+ };
267
+ } & {
268
+ new (...args: any[]): {
269
+ readonly databasePrefix: string;
270
+ createDatabase(params: import("./types").HttpDatabaseCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
271
+ dropDatabase(params: import("./types").HttpDatabaseDropReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
272
+ describeDatabase(params: import("./types").HttpDatabaseDescribeReq, options?: FetchOptions | undefined): Promise<import("./types").HttpDatabaseDescribeResponse>;
273
+ listDatabases(options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
274
+ alterDatabaseProperties(params: import("./types").HttpDatabaseAlterPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpDatabaseAlterPropertiesResponse>;
275
+ dropDatabaseProperties(params: import("./types").HttpDatabaseDropPropertiesReq, options?: FetchOptions | undefined): Promise<import("./types").HttpDatabaseDropPropertiesResponse>;
237
276
  config: HttpClientConfig;
238
277
  readonly baseURL: string;
239
278
  readonly authorization: string;
@@ -197,7 +197,7 @@ exports.HttpBaseClient = HttpBaseClient;
197
197
  * - Role
198
198
  * - User APIs.
199
199
  */
200
- class HttpClient extends (0, http_1.User)((0, http_1.Role)((0, http_1.MilvusIndex)((0, http_1.Import)((0, http_1.Alias)((0, http_1.Partition)((0, http_1.Collection)((0, http_1.Vector)(HttpBaseClient)))))))) {
200
+ class HttpClient extends (0, http_1.User)((0, http_1.Role)((0, http_1.MilvusIndex)((0, http_1.Import)((0, http_1.Alias)((0, http_1.Partition)((0, http_1.Collection)((0, http_1.Database)((0, http_1.Vector)(HttpBaseClient))))))))) {
201
201
  }
202
202
  exports.HttpClient = HttpClient;
203
203
  //# sourceMappingURL=HttpClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../milvus/HttpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCASgB;AAChB,2CAIyB;AAEzB;;;GAGG;AACH,MAAa,SAAU,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,MAAc,EACd,UAAkB,EAClB,GAAW;QAElB,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAClB,QAAG,GAAH,GAAG,CAAQ;QAGlB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,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AClB;aACF;;KACF;CACF;AA9JD,wCA8JC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,UAAW,SAAQ,IAAA,WAAI,EAClC,IAAA,WAAI,EACF,IAAA,kBAAW,EACT,IAAA,aAAM,EAAC,IAAA,YAAK,EAAC,IAAA,gBAAS,EAAC,IAAA,iBAAU,EAAC,IAAA,eAAQ,EAAC,IAAA,aAAM,EAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACvE,CACF,CACF;CAAG;AANJ,gCAMI"}
@@ -1,7 +1,9 @@
1
1
  export declare enum METADATA {
2
2
  DATABASE = "dbname",
3
3
  AUTH = "authorization",
4
- CLIENT_ID = "identifier"
4
+ CLIENT_ID = "identifier",
5
+ CLIENT_REQUEST_ID = "client-request-id",
6
+ CLIENT_REQUEST_UNIXMSEC = "client-request-unixmsec"
5
7
  }
6
8
  export declare enum CONNECT_STATUS {
7
9
  NOT_CONNECTED = 0,
@@ -6,6 +6,8 @@ var METADATA;
6
6
  METADATA["DATABASE"] = "dbname";
7
7
  METADATA["AUTH"] = "authorization";
8
8
  METADATA["CLIENT_ID"] = "identifier";
9
+ METADATA["CLIENT_REQUEST_ID"] = "client-request-id";
10
+ METADATA["CLIENT_REQUEST_UNIXMSEC"] = "client-request-unixmsec";
9
11
  })(METADATA = exports.METADATA || (exports.METADATA = {}));
10
12
  var CONNECT_STATUS;
11
13
  (function (CONNECT_STATUS) {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../milvus/const/client.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,kCAAsB,CAAA;IACtB,oCAAwB,CAAA;AAC1B,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB;AAED,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,qEAAa,CAAA;IACb,+DAAc,CAAA;IACd,6DAAa,CAAA;IACb,qEAAa,CAAA;IACb,2DAAY,CAAA;AACd,CAAC,EANW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAMzB;AAED,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,+CAAQ,CAAA;IACR,6CAAO,CAAA;IACP,6CAAO,CAAA;IACP,uDAAY,CAAA;AACd,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../milvus/const/client.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,kCAAsB,CAAA;IACtB,oCAAwB,CAAA;IACxB,mDAAuC,CAAA;IACvC,+DAAmD,CAAA;AACrD,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAED,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,qEAAa,CAAA;IACb,+DAAc,CAAA;IACd,6DAAa,CAAA;IACb,qEAAa,CAAA;IACb,2DAAY,CAAA;AACd,CAAC,EANW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAMzB;AAED,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,+CAAQ,CAAA;IACR,6CAAO,CAAA;IACP,6CAAO,CAAA;IACP,uDAAY,CAAA;AACd,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB"}
@@ -34,6 +34,8 @@ export declare const ERROR_REASONS: {
34
34
  PARTITION_KEY_FIELD_MAXED_OUT: string;
35
35
  IDS_REQUIRED: string;
36
36
  NO_ANNS_FEILD_FOUND_IN_SEARCH: string;
37
+ FUNCTION_SCHEMA_IS_REQUIRED: string;
38
+ FUNCTION_NAME_IS_REQUIRED: string;
37
39
  };
38
40
  export declare enum ErrorCode {
39
41
  SUCCESS = "Success",
@@ -40,6 +40,8 @@ exports.ERROR_REASONS = {
40
40
  PARTITION_KEY_FIELD_MAXED_OUT: `Only ${_1.MAX_PARTITION_KEY_FIELD_COUNT} field supports partition key. `,
41
41
  IDS_REQUIRED: 'The `ids` is missing or empty.',
42
42
  NO_ANNS_FEILD_FOUND_IN_SEARCH: 'Target anns field not found, please check your search parameters.',
43
+ FUNCTION_SCHEMA_IS_REQUIRED: 'The `function` property is missing.',
44
+ FUNCTION_NAME_IS_REQUIRED: 'The `function_name` property is missing.',
43
45
  };
44
46
  var ErrorCode;
45
47
  (function (ErrorCode) {
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../milvus/const/error.ts"],"names":[],"mappings":";;;AAAA,yBAIY;AAEC,QAAA,aAAa,GAAG;IAC3B,0BAA0B,EAAE,oCAAoC;IAChE,gCAAgC,EAC9B,4DAA4D;IAC9D,8BAA8B,EAC5B,wDAAwD;IAC1D,mCAAmC,EACjC,mEAAmE;IACrE,0CAA0C,EACxC,kGAAkG;IACpG,gCAAgC,EAAE,gCAAgC;IAClE,uCAAuC,EACrC,sCAAsC;IACxC,kCAAkC,EAChC,yEAAyE;IAC3E,2BAA2B,EAAE,4CAA4C;IACzE,yBAAyB,EAAE,yCAAyC;IACpE,sCAAsC,EACpC,oEAAoE;IACtE,mCAAmC,EACjC,yEAAyE;IAC3E,wBAAwB,EACtB,qEAAqE;IACvE,sBAAsB,EACpB,yEAAyE;IAC3E,4BAA4B,EAC1B,yDAAyD;IAC3D,uBAAuB,EAAE,wCAAwC;IACjE,4BAA4B,EAC1B,2DAA2D;IAC7D,yBAAyB,EAAE,uCAAuC;IAClE,2BAA2B,EAAE,4CAA4C;IACzE,sBAAsB,EAAE,kCAAkC;IAC1D,yBAAyB,EAAE,yCAAyC;IACpE,yBAAyB,EACvB,mDAAmD;IACrD,oBAAoB,EAAE,qCAAqC;IAC3D,oBAAoB,EAAE,iDAAiD;IACvE,qBAAqB,EACnB,wFAAwF;IAC1F,eAAe,EAAE,qDAAqD;IACtE,iBAAiB,EAAE,kCAAkC;IACrD,0BAA0B,EAAE,8CAA8C;IAC1E,4BAA4B,EAC1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IAC3D,uBAAuB,EAAE,wCAAwC;IACjE,4BAA4B,EAC1B,2DAA2D;IAC7D,yBAAyB,EAAE,uCAAuC;IAClE,2BAA2B,EAAE,4CAA4C;IACzE,sBAAsB,EAAE,kCAAkC;IAC1D,yBAAyB,EAAE,yCAAyC;IACpE,yBAAyB,EACvB,mDAAmD;IACrD,oBAAoB,EAAE,qCAAqC;IAC3D,oBAAoB,EAAE,iDAAiD;IACvE,qBAAqB,EACnB,wFAAwF;IAC1F,eAAe,EAAE,qDAAqD;IACtE,iBAAiB,EAAE,kCAAkC;IACrD,0BAA0B,EAAE,8CAA8C;IAC1E,4BAA4B,EAC1B,gDAAgD;IAClD,yBAAyB,EAAE,qDAAqD,MAAM,CAAC,IAAI,CACzF,cAAW,CACZ;SACE,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,QAAQ,CAAC;SACrD,IAAI,CAAC,IAAI,CAAC,GAAG;IAEhB,qBAAqB,EAAE,8CAA8C,wBAAqB,EAAE;IAC5F,gCAAgC,EAC9B,oEAAoE;IACtE,6BAA6B,EAAE,QAAQ,gCAA6B,iCAAiC;IACrG,YAAY,EAAE,gCAAgC;IAC9C,6BAA6B,EAAE,mEAAmE;IAClG,2BAA2B,EAAE,qCAAqC;IAClE,yBAAyB,EAAE,0CAA0C;CACtE,CAAC;AAEF,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,4CAA+B,CAAA;IAC/B,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;IACnC,oCAAuB,CAAA;IACvB,8CAAiC,CAAA;AACnC,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB"}
@@ -92,7 +92,7 @@ class BaseClient {
92
92
  this.channelOptions = Object.assign({
93
93
  // Milvus default max_receive_message_length is 100MB, but Milvus support change max_receive_message_length .
94
94
  // So SDK should support max_receive_message_length unlimited.
95
- 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.keepalive_time_ms': 55 * 1000, 'grpc.keepalive_timeout_ms': 5 * 1000, 'grpc.keepalive_permit_without_calls': 1, 'grpc.enable_retries': 1 }, this.config.channelOptions);
95
+ 'grpc.max_receive_message_length': -1, 'grpc.max_send_message_length': -1, 'grpc.keepalive_time_ms': 10 * 1000, 'grpc.keepalive_timeout_ms': 5 * 1000, 'grpc.keepalive_permit_without_calls': 1, 'grpc.enable_retries': 1 }, this.config.channelOptions);
96
96
  // overwrite if server name is provided.
97
97
  if ((_a = this.config.tls) === null || _a === void 0 ? void 0 : _a.serverName) {
98
98
  this.channelOptions[`grpc.ssl_target_name_override`] =
@@ -1,6 +1,6 @@
1
1
  import { Database } from './Database';
2
2
  import { LRUCache } from 'lru-cache';
3
- import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DescribeAliasReq, ListAliasesReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq, GetReplicaReq, RenameCollectionReq, GetLoadingProgressReq, GetLoadStateReq, BoolResponse, ResStatus, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse, GetLoadingProgressResponse, GetLoadStateResponse, DescribeAliasResponse, ListAliasesResponse, AlterCollectionReq, DataType, FieldSchema, DropCollectionPropertiesReq, AlterCollectionFieldPropertiesReq, RefreshLoadReq, AddCollectionFieldReq, AddCollectionFieldsReq } from '../';
3
+ import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DescribeAliasReq, ListAliasesReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq, GetReplicaReq, RenameCollectionReq, GetLoadingProgressReq, GetLoadStateReq, BoolResponse, ResStatus, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse, GetLoadingProgressResponse, GetLoadStateResponse, DescribeAliasResponse, ListAliasesResponse, AlterCollectionReq, DataType, FieldSchema, DropCollectionPropertiesReq, AlterCollectionFieldPropertiesReq, RefreshLoadReq, AddCollectionFieldReq, AddCollectionFieldsReq, AddCollectionFunctionReq, AlterCollectionFunctionReq, DropCollectionFunctionReq } from '../';
4
4
  /**
5
5
  * @see [collection operation examples](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
6
6
  */
@@ -697,4 +697,89 @@ export declare class Collection extends Database {
697
697
  * Get the primary field
698
698
  */
699
699
  getPkField(data: DescribeCollectionReq): Promise<FieldSchema>;
700
+ /**
701
+ * Add a function to a collection.
702
+ *
703
+ * @param {AddCollectionFunctionReq} data - The request parameters.
704
+ * @param {string} data.collection_name - The name of the collection.
705
+ * @param {FunctionObject} data.function - The function schema to be added.
706
+ * @param {string} [data.db_name] - The name of the database where the collection is located.
707
+ * @param {number} [data.timeout] - An optional duration of time in milliseconds 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.
708
+ *
709
+ * @returns {Promise<ResStatus>} The response status of the operation.
710
+ * @returns {string} status.error_code - The error code of the operation.
711
+ * @returns {string} status.reason - The reason for the error, if any.
712
+ *
713
+ * @example
714
+ * ```
715
+ * const milvusClient = new MilvusClient(MILVUS_ADDRESS);
716
+ * const resStatus = await milvusClient.addCollectionFunction({
717
+ * collection_name: 'my_collection',
718
+ * function: {
719
+ * name: 'my_function',
720
+ * description: 'A custom function',
721
+ * type: FunctionType.Rerank,
722
+ * input_field_names: ['field1', 'field2'],
723
+ * output_field_names: ['output_field'],
724
+ * params: { key: 'value' }
725
+ * }
726
+ * });
727
+ * ```
728
+ */
729
+ addCollectionFunction(data: AddCollectionFunctionReq): Promise<ResStatus>;
730
+ /**
731
+ * Alter a function in a collection.
732
+ *
733
+ * @param {AlterCollectionFunctionReq} data - The request parameters.
734
+ * @param {string} data.collection_name - The name of the collection.
735
+ * @param {string} data.function_name - The name of the function to alter.
736
+ * @param {FunctionObject} data.function - The updated function schema.
737
+ * @param {string} [data.db_name] - The name of the database where the collection is located.
738
+ * @param {number} [data.timeout] - An optional duration of time in milliseconds 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.
739
+ *
740
+ * @returns {Promise<ResStatus>} The response status of the operation.
741
+ * @returns {string} status.error_code - The error code of the operation.
742
+ * @returns {string} status.reason - The reason for the error, if any.
743
+ *
744
+ * @example
745
+ * ```
746
+ * const milvusClient = new MilvusClient(MILVUS_ADDRESS);
747
+ * const resStatus = await milvusClient.alterCollectionFunction({
748
+ * collection_name: 'my_collection',
749
+ * function_name: 'my_function',
750
+ * function: {
751
+ * name: 'my_function',
752
+ * description: 'Updated function description',
753
+ * type: FunctionType.Rerank,
754
+ * input_field_names: ['field1', 'field2'],
755
+ * output_field_names: ['output_field'],
756
+ * params: { key: 'updated_value' }
757
+ * }
758
+ * });
759
+ * ```
760
+ */
761
+ alterCollectionFunction(data: AlterCollectionFunctionReq): Promise<ResStatus>;
762
+ /**
763
+ * Drop a function from a collection.
764
+ *
765
+ * @param {DropCollectionFunctionReq} data - The request parameters.
766
+ * @param {string} data.collection_name - The name of the collection.
767
+ * @param {string} data.function_name - The name of the function to drop.
768
+ * @param {string} [data.db_name] - The name of the database where the collection is located.
769
+ * @param {number} [data.timeout] - An optional duration of time in milliseconds 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.
770
+ *
771
+ * @returns {Promise<ResStatus>} The response status of the operation.
772
+ * @returns {string} status.error_code - The error code of the operation.
773
+ * @returns {string} status.reason - The reason for the error, if any.
774
+ *
775
+ * @example
776
+ * ```
777
+ * const milvusClient = new MilvusClient(MILVUS_ADDRESS);
778
+ * const resStatus = await milvusClient.dropCollectionFunction({
779
+ * collection_name: 'my_collection',
780
+ * function_name: 'my_function'
781
+ * });
782
+ * ```
783
+ */
784
+ dropCollectionFunction(data: DropCollectionFunctionReq): Promise<ResStatus>;
700
785
  }