@zilliz/milvus2-sdk-node 2.2.6 → 2.2.8

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 (57) hide show
  1. package/README.md +162 -14
  2. package/dist/milvus/BaseClient.d.ts +9 -8
  3. package/dist/milvus/BaseClient.js +47 -18
  4. package/dist/milvus/BaseClient.js.map +1 -1
  5. package/dist/milvus/Collection.d.ts +49 -49
  6. package/dist/milvus/Collection.js +105 -91
  7. package/dist/milvus/Collection.js.map +1 -1
  8. package/dist/milvus/Data.d.ts +12 -22
  9. package/dist/milvus/Data.js +100 -90
  10. package/dist/milvus/Data.js.map +1 -1
  11. package/dist/milvus/MilvusClient.js +2 -2
  12. package/dist/milvus/MilvusClient.js.map +1 -1
  13. package/dist/milvus/MilvusIndex.d.ts +46 -46
  14. package/dist/milvus/MilvusIndex.js +59 -51
  15. package/dist/milvus/MilvusIndex.js.map +1 -1
  16. package/dist/milvus/Partition.js +7 -7
  17. package/dist/milvus/Partition.js.map +1 -1
  18. package/dist/milvus/Resource.js +6 -6
  19. package/dist/milvus/Resource.js.map +1 -1
  20. package/dist/milvus/User.js +15 -15
  21. package/dist/milvus/User.js.map +1 -1
  22. package/dist/milvus/const/ErrorReason.d.ts +29 -32
  23. package/dist/milvus/const/ErrorReason.js +29 -32
  24. package/dist/milvus/const/ErrorReason.js.map +1 -1
  25. package/dist/milvus/const/Milvus.d.ts +2 -0
  26. package/dist/milvus/const/Milvus.js +7 -1
  27. package/dist/milvus/const/Milvus.js.map +1 -1
  28. package/dist/milvus/index.d.ts +1 -0
  29. package/dist/milvus/index.js +1 -0
  30. package/dist/milvus/index.js.map +1 -1
  31. package/dist/milvus/types/Client.d.ts +9 -0
  32. package/dist/milvus/types/Client.js +3 -0
  33. package/dist/milvus/types/Client.js.map +1 -0
  34. package/dist/milvus/types/Common.d.ts +3 -0
  35. package/dist/milvus/types/Data.d.ts +15 -2
  36. package/dist/milvus/types/Index.d.ts +9 -1
  37. package/dist/milvus/types.d.ts +1 -0
  38. package/dist/milvus/types.js +1 -0
  39. package/dist/milvus/types.js.map +1 -1
  40. package/dist/proto/proto/common.proto +1 -0
  41. package/dist/proto/proto/google/protobuf/descriptor.proto +19 -3
  42. package/dist/proto/proto/milvus.proto +24 -0
  43. package/dist/proto/proto/schema.proto +13 -1
  44. package/dist/sdk.json +1 -1
  45. package/dist/utils/Format.d.ts +8 -0
  46. package/dist/utils/Format.js +31 -1
  47. package/dist/utils/Format.js.map +1 -1
  48. package/dist/utils/Function.d.ts +9 -1
  49. package/dist/utils/Function.js +18 -5
  50. package/dist/utils/Function.js.map +1 -1
  51. package/dist/utils/Validate.d.ts +7 -1
  52. package/dist/utils/Validate.js +64 -18
  53. package/dist/utils/Validate.js.map +1 -1
  54. package/dist/utils/test.d.ts +8 -7
  55. package/dist/utils/test.js +48 -18
  56. package/dist/utils/test.js.map +1 -1
  57. package/package.json +5 -5
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  # Milvus2-sdk-node
7
7
 
8
- Node.js sdk for [Milvus](https://github.com/milvus-io/milvus).
8
+ The official [Milvus](https://github.com/milvus-io/milvus) client for Node.js.
9
9
 
10
10
  ## Compatibility
11
11
 
@@ -20,24 +20,177 @@ The following collection shows Milvus versions and recommended @zilliz/milvus2-s
20
20
 
21
21
  ## Dependencies
22
22
 
23
- - Milvus: v2+
23
+ - [Milvus](https://milvus.io/)
24
+ - [Zilliz Cloud](https://cloud.zilliz.com/signup)
24
25
  - Node: v12+
25
26
 
26
27
  ## Installation
27
28
 
29
+ The recommended way to get started using the Milvus node.js client is by using npm (Node package manager) to install the dependency in your project.
30
+
28
31
  ```javascript
29
32
  npm install @zilliz/milvus2-sdk-node
33
+ # or ...
34
+ yarn add @zilliz/milvus2-sdk-node
35
+ ```
36
+
37
+ This will download the Milvus node.js client and add a dependency entry in your package.json file.
38
+
39
+ ## Quick Start
40
+
41
+ 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/).
42
+
43
+ ### Create the package.json file
44
+
45
+ First, create a directory where your application will live.
46
+
47
+ ```
48
+ mkdir myProject
49
+ cd myProject
50
+ ```
51
+
52
+ Enter the following command and answer the questions to create the initial structure for your new project:
53
+
54
+ ```shell
55
+ npm init -y
56
+ ```
57
+
58
+ Next, install this client as a dependency.
59
+
60
+ ```shell
61
+ npm install @zilliz/milvus2-sdk-node
62
+ ```
63
+
64
+ ### Start a milvus server
65
+
66
+ ```shell
67
+ # Download the milvus standalone yaml file
68
+ $ wget https://github.com/milvus-io/milvus/releases/download/v2.2.8/milvus-standalone-docker-compose.yml -O docker-compose.yml
69
+
70
+ # start the milvus server
71
+ sudo docker-compose up -d
72
+ ```
73
+
74
+ ### Connect to Milvus
75
+
76
+ Create a new app.js file and add the following code to try out some basic vector operations using the Milvus node.js client.
77
+
78
+ ```javascript
79
+ import { MilvusClient, DataType } from '@zilliz/milvus2-sdk-node';
80
+
81
+ const IP = 'your-milvus-ip';
82
+
83
+ // connect to milvus
84
+ const client = new MilvusClient(IP);
85
+ ```
86
+
87
+ ### define schema for collection
88
+
89
+ ```javascript
90
+ // define schema
91
+ const collection_name = `book`;
92
+ const dim = 128;
93
+ const schema = [
94
+ {
95
+ name: `book_id`,
96
+ description: `customized primary id`,
97
+ data_type: DataType.Int64,
98
+ is_primary_key: true,
99
+ autoID: false,
100
+ },
101
+ {
102
+ name: `word_count`,
103
+ description: `word count`,
104
+ data_type: DataType.Int64,
105
+ },
106
+ {
107
+ name: `book_intro`,
108
+ description: `word count`,
109
+ data_type: DataType.FloatVector,
110
+ dim: dim,
111
+ },
112
+ ];
113
+ ```
114
+
115
+ ### create collection
116
+
117
+ ```javascript
118
+ await client.createCollection({
119
+ collection_name,
120
+ description: `my first collection`,
121
+ fields: schema,
122
+ });
123
+ ```
124
+
125
+ ### prepare data
126
+
127
+ ```javascript
128
+ // generate mock data
129
+ const fields_data = [];
130
+
131
+ // generate mock data
132
+ for (let i = 0; i < 1000; i++) {
133
+ // create a new object with random values for each field
134
+ const r = {
135
+ book_id: Math.floor(Math.random() * 100000), // generate a random book ID
136
+ word_count: Math.floor(Math.random() * 1000), // generate a random word count
137
+ book_intro: [...Array(dim)].map(() => Math.random()), // generate a random vector for book_intro
138
+ };
139
+ // add the new object to the fields_data array
140
+ fields_data.push(r);
141
+ }
30
142
  ```
31
143
 
32
- More documentation, you can refer [Milvus offical website](https://milvus.io/).
144
+ ### insert data into collection
33
145
 
34
- ## Example
146
+ ```javascript
147
+ await client.insert({
148
+ collection_name,
149
+ fields_data,
150
+ });
151
+ ```
35
152
 
36
- 1. [Hello World](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/HelloMilvus.ts)
37
- 2. [Create a collection](https://milvus.io/docs/create_collection.md)
38
- 3. [Insert data](https://milvus.io/docs/insert_data.md)
39
- 4. [Build index](https://milvus.io/docs/build_index.md)
40
- 5. [Do vector search](https://milvus.io/docs/search.md)
153
+ ### create index and load collection into memory
154
+
155
+ ```javascript
156
+ // create index
157
+ await client.createIndex({
158
+ collection_name,
159
+ field_name: 'book_intro',
160
+ index_name: 'myindex',
161
+ index_type: 'IVF_FLAT',
162
+ metric_type: 'L2',
163
+ });
164
+ // load collection
165
+ await client.loadCollectionSync({
166
+ collection_name,
167
+ });
168
+ ```
169
+
170
+ ### vector search
171
+
172
+ ```javascript
173
+ // Generate a random search vector
174
+ const searchVector = [...Array(dim)].map(() => Math.random());
175
+
176
+ // Perform a vector search on the collection
177
+ const res = await client.search({
178
+ collection_name, // required, the collection name
179
+ vectors: [0.1, 0.2, 0.3, 0.4], // required, vector used to compare other vectors in milvus
180
+ filter: 'word_count > 0', // optional, filter
181
+ params: { nprobe: 64 }, // optional, specify the search parameters
182
+ limit: 1, // specify the number of nearest neighbors to return
183
+ metric_type: 'L2', // optional, metric to calculate similarity of two vectors
184
+ output_fields: ['book_id', 'word_count'], // optional, specify the fields to return in the search results
185
+ });
186
+ ```
187
+
188
+ ## Next Steps
189
+
190
+ - [What is Milvus](https://milvus.io/)
191
+ - [Milvus Node SDK API reference](https://milvus.io/api-reference/node/v2.2.x/About.md)
192
+ - [Attu, Milvus GUI tool, based on Milvus node.js SDK](https://github.com/zilliztech/attu)
193
+ - [Feder, anns index visuliazation tool](https://github.com/zilliztech/feder)
41
194
 
42
195
  ## How to contribute
43
196
 
@@ -47,8 +200,3 @@ More documentation, you can refer [Milvus offical website](https://milvus.io/).
47
200
  2. `git submodule update --remote`
48
201
  3. Add feature in milvus folder.
49
202
  4. Run test `yarn test -- test/Your-test-for-your-feature.spec.ts`
50
-
51
- ## Others
52
-
53
- - [Attu](https://github.com/zilliztech/attu) which is a Milvus web interface tool, depends on Milvus node.js SDK.
54
- - [Feder](https://github.com/zilliztech/feder) which is a visualization tool for visualize hnsw, faiss and other index.
@@ -1,17 +1,18 @@
1
1
  import { Root } from 'protobufjs';
2
- import { Client } from '@grpc/grpc-js';
2
+ import { Client, ChannelOptions } from '@grpc/grpc-js';
3
+ import { MilvusClientConfig } from '.';
3
4
  export declare class BaseClient {
4
5
  schemaProto: Root;
5
6
  milvusProto: Root;
6
7
  grpcClient: Client;
8
+ timeout: number;
7
9
  /**
8
- * Connect to milvus grpc client.
9
- *
10
- * @param address milvus address like: 127.0.0.1:19530
11
- * @param ssl ssl connect or not, default is false
12
- * @param username After created user in Milvus, username is required
13
- * @param password After created user in Milvus, password is required
10
+ * Connect to a Milvus gRPC client.
14
11
  *
12
+ * @param configOrAddress The configuration object or the Milvus address as a string.
13
+ * @param ssl Whether to use SSL or not. Default is false.
14
+ * @param username The username for authentication. Required if password is provided.
15
+ * @param password The password for authentication. Required if username is provided.
15
16
  */
16
- constructor(address: string, ssl?: boolean, username?: string, password?: string);
17
+ constructor(configOrAddress: MilvusClientConfig | string, ssl?: boolean, username?: string, password?: string, channelOptions?: ChannelOptions);
17
18
  }
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
@@ -9,27 +20,40 @@ var protobufjs_1 = __importDefault(require("protobufjs"));
9
20
  var grpc_js_1 = require("@grpc/grpc-js");
10
21
  var _1 = require(".");
11
22
  var utils_1 = require("../utils");
12
- // pathes
23
+ // path
13
24
  var protoPath = path_1.default.resolve(__dirname, '../proto/proto/milvus.proto');
14
25
  var schemaProtoPath = path_1.default.resolve(__dirname, '../proto/proto/schema.proto');
15
26
  // Base Client
16
27
  var BaseClient = /** @class */ (function () {
17
28
  /**
18
- * Connect to milvus grpc client.
19
- *
20
- * @param address milvus address like: 127.0.0.1:19530
21
- * @param ssl ssl connect or not, default is false
22
- * @param username After created user in Milvus, username is required
23
- * @param password After created user in Milvus, password is required
29
+ * Connect to a Milvus gRPC client.
24
30
  *
31
+ * @param configOrAddress The configuration object or the Milvus address as a string.
32
+ * @param ssl Whether to use SSL or not. Default is false.
33
+ * @param username The username for authentication. Required if password is provided.
34
+ * @param password The password for authentication. Required if username is provided.
25
35
  */
26
- function BaseClient(address, ssl, username, password) {
36
+ function BaseClient(configOrAddress, ssl, username, password, channelOptions) {
37
+ var config;
38
+ // If a configuration object is provided, use it. Otherwise, create a new object with the provided parameters.
39
+ if (typeof configOrAddress === 'object') {
40
+ config = configOrAddress;
41
+ }
42
+ else {
43
+ config = {
44
+ address: configOrAddress,
45
+ ssl: ssl,
46
+ username: username,
47
+ password: password,
48
+ channelOptions: channelOptions,
49
+ };
50
+ }
27
51
  // check if address is set
28
- if (!address) {
52
+ if (!config.address) {
29
53
  throw new Error(_1.ERROR_REASONS.MILVUS_ADDRESS_IS_REQUIRED);
30
54
  }
31
55
  // if we need to create auth interceptors
32
- var needAuth = username !== undefined && password !== undefined;
56
+ var needAuth = config.username !== undefined && config.password !== undefined;
33
57
  // get Milvus GRPC service
34
58
  var MilvusService = (0, utils_1.getGRPCService)({
35
59
  protoPath: protoPath,
@@ -37,20 +61,25 @@ var BaseClient = /** @class */ (function () {
37
61
  });
38
62
  // create interceptors
39
63
  var interceptors = needAuth
40
- ? (0, utils_1.getAuthInterceptor)(username, password)
64
+ ? (0, utils_1.getAuthInterceptor)(config.username, config.password)
41
65
  : null;
42
66
  // load proto
43
67
  this.schemaProto = protobufjs_1.default.loadSync(schemaProtoPath);
44
68
  this.milvusProto = protobufjs_1.default.loadSync(protoPath);
45
- // create grpc client
46
- this.grpcClient = new MilvusService((0, utils_1.formatAddress)(address), // format the address
47
- ssl ? grpc_js_1.credentials.createSsl() : grpc_js_1.credentials.createInsecure(), // create SSL or insecure credentials
48
- {
49
- interceptors: [interceptors],
69
+ // setup timeout
70
+ this.timeout =
71
+ typeof config.timeout === 'string'
72
+ ? (0, utils_1.parseTimeToken)(config.timeout)
73
+ : config.timeout || _1.DEFAULT_CONNECT_TIMEOUT;
74
+ // options
75
+ var options = __assign({ interceptors: [interceptors],
50
76
  // Milvus default max_receive_message_length is 100MB, but Milvus support change max_receive_message_length .
51
77
  // So SDK should support max_receive_message_length unlimited.
52
- 'grpc.max_receive_message_length': -1, // set max_receive_message_length to unlimited
53
- });
78
+ 'grpc.max_receive_message_length': -1 }, config.channelOptions);
79
+ // create grpc client
80
+ this.grpcClient = new MilvusService((0, utils_1.formatAddress)(config.address), // format the address
81
+ config.ssl ? grpc_js_1.credentials.createSsl() : grpc_js_1.credentials.createInsecure(), // create SSL or insecure credentials
82
+ options);
54
83
  }
55
84
  return BaseClient;
56
85
  }());
@@ -1 +1 @@
1
- {"version":3,"file":"BaseClient.js","sourceRoot":"","sources":["../../milvus/BaseClient.ts"],"names":[],"mappings":";;;;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AmC,EAAE,iCAAiC;SACpF,CAAC,CAAC;QAEH,sBAAsB;QACtB,IAAM,YAAY,GAAG,QAAQ;YAC3B,CAAC,CAAC,IAAA,0BAAkB,EAAC,MAAM,CAAC,QAAS,EAAE,MAAM,CAAC,QAAS,CAAC;YACxD,CAAC,CAAC,IAAI,CAAC;QAET,aAAa;QACb,IAAI,CAAC,WAAW,GAAG,oBAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,oBAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEhD,gBAAgB;QAChB,IAAI,CAAC,OAAO;YACV,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;gBAChC,CAAC,CAAC,IAAA,sBAAc,EAAC,MAAM,CAAC,OAAO,CAAC;gBAChC,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,0BAAuB,CAAC;QAEhD,UAAU;QACV,IAAM,OAAO,cACX,YAAY,EAAE,CAAC,YAAY,CAAC;YAC5B,6GAA6G;YAC7G,8DAA8D;YAC9D,iCAAiC,EAAE,CAAC,CAAC,IAClC,MAAM,CAAC,cAAc,CACzB,CAAC;QAEF,qBAAqB;QACrB,IAAI,CAAC,UAAU,GAAG,IAAI,aAAa,CACjC,IAAA,qBAAa,EAAC,MAAM,CAAC,OAAO,CAAC,EAAE,qBAAqB;QACpD,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,qBAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,qBAAW,CAAC,cAAc,EAAE,EAAE,qCAAqC;QAC1G,OAAO,CACR,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAtFD,IAsFC;AAtFY,gCAAU"}
@@ -474,56 +474,56 @@ export declare class Collection extends BaseClient {
474
474
  */
475
475
  getReplicas(data: GetReplicaReq): Promise<ReplicasResponse>;
476
476
  /**
477
- * Get loading progress of a collection
478
- *
479
- * @param data
480
- * | Property | Type | Description |
481
- * | :-- | :-- | :-- |
482
- * | collection_name | string | the name of the collection |
483
- * | 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 |
484
- *
485
- * @returns
486
- * | Property | Description |
487
- * | :-- | :-- |
488
- * | status | { error_code: number, reason: string } |
489
- * | total_row_num | the total number of rows in the collection |
490
- * | total_loaded_row_num | the total number of loaded rows in the collection |
491
- *
492
- * @throws {Error} if `collection_name` property is not present in `data`
493
- *
494
- * #### Example
495
- *
496
- * ```
497
- * new milvusClient(MILUVS_ADDRESS).getLoadingProgress({
498
- * collection_name: 'my_collection',
499
- * });
500
- * ```
501
- */
477
+ * Get loading progress of a collection
478
+ *
479
+ * @param data
480
+ * | Property | Type | Description |
481
+ * | :-- | :-- | :-- |
482
+ * | collection_name | string | the name of the collection |
483
+ * | 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 |
484
+ *
485
+ * @returns
486
+ * | Property | Description |
487
+ * | :-- | :-- |
488
+ * | status | { error_code: number, reason: string } |
489
+ * | total_row_num | the total number of rows in the collection |
490
+ * | total_loaded_row_num | the total number of loaded rows in the collection |
491
+ *
492
+ * @throws {Error} if `collection_name` property is not present in `data`
493
+ *
494
+ * #### Example
495
+ *
496
+ * ```
497
+ * new milvusClient(MILUVS_ADDRESS).getLoadingProgress({
498
+ * collection_name: 'my_collection',
499
+ * });
500
+ * ```
501
+ */
502
502
  getLoadingProgress(data: GetLoadingProgressReq): Promise<GetLoadingProgressResponse>;
503
503
  /**
504
- * Get the loading state of a collection
505
- *
506
- * @param data
507
- * | Property | Type | Description |
508
- * | :-- | :-- | :-- |
509
- * | collection_name | string | the name of the collection |
510
- * | timeout? | number | 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 an error occurs. Default is undefined |
511
- *
512
- * @returns
513
- * | Property | Description |
514
- * | :-- | :-- |
515
- * | status | { error_code: number, reason: string } |
516
- * | state | the loading state of the collection |
517
- *
518
- * @throws {Error} if `collection_name` property is not present in `data`
519
- *
520
- * #### Example
521
- *
522
- * ```
523
- * new milvusClient(MILUVS_ADDRESS).getLoadState({
524
- * collection_name: 'my_collection',
525
- * });
526
- * ```
527
- */
504
+ * Get the loading state of a collection
505
+ *
506
+ * @param data
507
+ * | Property | Type | Description |
508
+ * | :-- | :-- | :-- |
509
+ * | collection_name | string | the name of the collection |
510
+ * | timeout? | number | 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 an error occurs. Default is undefined |
511
+ *
512
+ * @returns
513
+ * | Property | Description |
514
+ * | :-- | :-- |
515
+ * | status | { error_code: number, reason: string } |
516
+ * | state | the loading state of the collection |
517
+ *
518
+ * @throws {Error} if `collection_name` property is not present in `data`
519
+ *
520
+ * #### Example
521
+ *
522
+ * ```
523
+ * new milvusClient(MILUVS_ADDRESS).getLoadState({
524
+ * collection_name: 'my_collection',
525
+ * });
526
+ * ```
527
+ */
528
528
  getLoadState(data: GetLoadStateReq): Promise<GetLoadStateResponse>;
529
529
  }