@zilliz/milvus2-sdk-node 2.2.9 → 2.2.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 (65) hide show
  1. package/README.md +75 -11
  2. package/dist/milvus/MilvusClient.d.ts +24 -1
  3. package/dist/milvus/MilvusClient.js +37 -3
  4. package/dist/milvus/MilvusClient.js.map +1 -1
  5. package/dist/milvus/const/index.d.ts +2 -0
  6. package/dist/milvus/const/index.js +20 -0
  7. package/dist/milvus/const/index.js.map +1 -0
  8. package/dist/milvus/{BaseClient.d.ts → grpc/BaseClient.d.ts} +6 -3
  9. package/dist/milvus/{BaseClient.js → grpc/BaseClient.js} +18 -16
  10. package/dist/milvus/grpc/BaseClient.js.map +1 -0
  11. package/dist/milvus/{Collection.d.ts → grpc/Collection.d.ts} +1 -1
  12. package/dist/milvus/{Collection.js → grpc/Collection.js} +16 -16
  13. package/dist/milvus/grpc/Collection.js.map +1 -0
  14. package/dist/milvus/{Data.d.ts → grpc/Data.d.ts} +1 -3
  15. package/dist/milvus/{Data.js → grpc/Data.js} +54 -56
  16. package/dist/milvus/grpc/Data.js.map +1 -0
  17. package/dist/milvus/grpc/GrpcClient.d.ts +36 -0
  18. package/dist/milvus/{GrpcClient.js → grpc/GrpcClient.js} +38 -55
  19. package/dist/milvus/grpc/GrpcClient.js.map +1 -0
  20. package/dist/milvus/{MilvusIndex.d.ts → grpc/MilvusIndex.d.ts} +1 -1
  21. package/dist/milvus/{MilvusIndex.js → grpc/MilvusIndex.js} +2 -2
  22. package/dist/milvus/grpc/MilvusIndex.js.map +1 -0
  23. package/dist/milvus/{Partition.d.ts → grpc/Partition.d.ts} +1 -1
  24. package/dist/milvus/{Partition.js → grpc/Partition.js} +4 -4
  25. package/dist/milvus/grpc/Partition.js.map +1 -0
  26. package/dist/milvus/{Resource.d.ts → grpc/Resource.d.ts} +1 -1
  27. package/dist/milvus/{Resource.js → grpc/Resource.js} +4 -4
  28. package/dist/milvus/grpc/Resource.js.map +1 -0
  29. package/dist/milvus/{User.d.ts → grpc/User.d.ts} +1 -1
  30. package/dist/milvus/{User.js → grpc/User.js} +10 -9
  31. package/dist/milvus/grpc/User.js.map +1 -0
  32. package/dist/milvus/index.d.ts +4 -13
  33. package/dist/milvus/index.js +6 -14
  34. package/dist/milvus/index.js.map +1 -1
  35. package/dist/milvus/types/Collection.d.ts +1 -1
  36. package/dist/milvus/types/Common.d.ts +1 -1
  37. package/dist/milvus/types/Index.d.ts +10 -59
  38. package/dist/milvus/types/Index.js +25 -0
  39. package/dist/milvus/types/Index.js.map +1 -1
  40. package/dist/milvus/types/MilvusIndex.d.ts +60 -0
  41. package/dist/milvus/types/MilvusIndex.js +3 -0
  42. package/dist/milvus/types/MilvusIndex.js.map +1 -0
  43. package/dist/milvus/types/User.d.ts +1 -1
  44. package/dist/milvus/types.d.ts +1 -1
  45. package/dist/milvus/types.js +2 -1
  46. package/dist/milvus/types.js.map +1 -1
  47. package/dist/sdk.json +1 -1
  48. package/dist/utils/Validate.js +1 -0
  49. package/dist/utils/Validate.js.map +1 -1
  50. package/dist/utils/test.d.ts +14 -0
  51. package/dist/utils/test.js +14 -0
  52. package/dist/utils/test.js.map +1 -1
  53. package/package.json +2 -2
  54. package/dist/milvus/BaseClient.js.map +0 -1
  55. package/dist/milvus/Collection.js.map +0 -1
  56. package/dist/milvus/Data.js.map +0 -1
  57. package/dist/milvus/GrpcClient.d.ts +0 -32
  58. package/dist/milvus/GrpcClient.js.map +0 -1
  59. package/dist/milvus/MilvusIndex.js.map +0 -1
  60. package/dist/milvus/Partition.js.map +0 -1
  61. package/dist/milvus/Resource.js.map +0 -1
  62. package/dist/milvus/User.js.map +0 -1
  63. package/dist/milvus/Utils.d.ts +0 -1
  64. package/dist/milvus/Utils.js +0 -8
  65. package/dist/milvus/Utils.js.map +0 -1
package/README.md CHANGED
@@ -87,17 +87,20 @@ const ssl = false; // secure or not
87
87
  const client = new MilvusClient({ address, ssl, username, password });
88
88
  ```
89
89
 
90
- | Parameters | Description | Type | Example |
91
- | ----------- | --------------------------------------------------------------------------------- | ------- | ------------------- |
92
- | address | The Milvus IP address | String | '192.168.0.1:19530' |
93
- | ssl? | SSL connection. It is false by default. | Boolean | false |
94
- | username? | The username used to connect to Milvus | String | milvus |
95
- | address? | The password used to connect to Milvus | String | milvus |
96
- | maxRetries? | The number of retries for the grpc method, by default: 3 | Number | 3 |
97
- | retryDelay? | The delay between attempts at retrying a failed grpc method in ms, by default: 30 | Number | 30 |
90
+ | Parameters | Description | Type | Example |
91
+ | --------------- | ------------------------------------------------------------------------------------------------------------------------ | ------- | ------------------- |
92
+ | address | The Milvus IP address | String | '192.168.0.1:19530' |
93
+ | ssl? | SSL connection. It is false by default. | Boolean | false |
94
+ | username? | The username used to connect to Milvus | String | milvus |
95
+ | address? | The password used to connect to Milvus | String | milvus |
96
+ | maxRetries? | The number of retries for the grpc method, by default: 3 | Number | 3 |
97
+ | retryDelay? | The delay between attempts at retrying a failed grpc method in ms, by default: 30 | Number | 30 |
98
+ | channelOptions? | an optional configuration object that can be passed to a gRPC client when creating a channel to connect to a gRPC server | Number | 30 |
98
99
 
99
100
  ### define schema for collection
100
101
 
102
+ The code shows an example of how to define a schema for a collection in Milvus using the Milvus Node SDK. A schema defines the properties of a collection, such as the names and data types of the fields that make up the vectors.
103
+
101
104
  ```javascript
102
105
  // define schema
103
106
  const collection_name = `book`;
@@ -124,6 +127,20 @@ const schema = [
124
127
  ];
125
128
  ```
126
129
 
130
+ In the code, the schema variable is defined as an array of objects, where each object represents a field in the collection. The fields are defined using the following properties:
131
+
132
+ `name`: The name of the field, which must be unique within the collection.
133
+
134
+ `description`: A description of the field, which can be used to provide additional information about the field.
135
+
136
+ `data_type`: The data type of the field, which can be one of several predefined data types such as Int64 or FloatVector.
137
+
138
+ `is_primary_key`: A boolean flag that indicates whether the field is a primary key. Primary keys are unique identifiers for each vector in the collection, and can be used to efficiently retrieve specific vectors.
139
+
140
+ `autoID`: A boolean flag that indicates whether the primary key is automatically generated by Milvus.
141
+
142
+ `dim`: The dimensionality of the vector field. For fields of type FloatVector, this specifies the number of dimensions in each vector.
143
+
127
144
  ### create collection
128
145
 
129
146
  ```javascript
@@ -136,6 +153,8 @@ await client.createCollection({
136
153
 
137
154
  ### prepare data
138
155
 
156
+ When using the Milvus Node SDK to insert data into a collection, it's important to ensure that the data format of the input matches the schema defined for the collection. The data format used by the Milvus Node SDK consists of an array of objects, where each object represents an entity. Typically, each object contains a unique identifier for the entity, which can be an integer or string, and a vector field that stores the feature values as an array of floating-point numbers.
157
+
139
158
  ```javascript
140
159
  // generate mock data
141
160
  const fields_data = [];
@@ -155,6 +174,8 @@ for (let i = 0; i < 1000; i++) {
155
174
 
156
175
  ### insert data into collection
157
176
 
177
+ Once we have the data, you can insert data into the collection.
178
+
158
179
  ```javascript
159
180
  await client.insert({
160
181
  collection_name,
@@ -162,7 +183,9 @@ await client.insert({
162
183
  });
163
184
  ```
164
185
 
165
- ### create index and load collection into memory
186
+ ### create index
187
+
188
+ 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.
166
189
 
167
190
  ```javascript
168
191
  // create index
@@ -170,9 +193,31 @@ await client.createIndex({
170
193
  collection_name,
171
194
  field_name: 'book_intro',
172
195
  index_name: 'myindex',
173
- index_type: 'IVF_FLAT',
196
+ index_type: 'HNSW',
197
+ param: { ef: 5 },
174
198
  metric_type: 'L2',
175
199
  });
200
+ ```
201
+
202
+ 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 IVF_FLAT, IVF_SQ8, IVF_PQ, and HNSW. When creating an index in Milvus, you must choose an appropriate index type based on your specific use case and data distribution.
203
+
204
+ `collection_name`: The name of the collection to create the index for.
205
+
206
+ `field_name`: The name of the field to create the index on.
207
+
208
+ `index_name`: The name of the index to create.
209
+
210
+ `index_type`: The type of index to create.
211
+
212
+ `param`: The index build parameters, please refer to the [index docs](https://milvus.io/docs/index.md).
213
+
214
+ `metric_type`: The distance metric to use when computing the similarity between vectors. In this case, the metric type is set to L2, which is a commonly used metric for computing the Euclidean distance between vectors.
215
+
216
+ ### load collection
217
+
218
+ 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.
219
+
220
+ ```javascript
176
221
  // load collection
177
222
  await client.loadCollectionSync({
178
223
  collection_name,
@@ -181,6 +226,8 @@ await client.loadCollectionSync({
181
226
 
182
227
  ### vector search
183
228
 
229
+ Now you can perform vector search on your collection.
230
+
184
231
  ```javascript
185
232
  // Generate a random search vector
186
233
  const searchVector = [...Array(dim)].map(() => Math.random());
@@ -188,7 +235,7 @@ const searchVector = [...Array(dim)].map(() => Math.random());
188
235
  // Perform a vector search on the collection
189
236
  const res = await client.search({
190
237
  collection_name, // required, the collection name
191
- vectors: [0.1, 0.2, 0.3, 0.4], // required, vector used to compare other vectors in milvus
238
+ vector: [0.1, 0.2, 0.3, 0.4], // required, vector used to compare other vectors in milvus
192
239
  filter: 'word_count > 0', // optional, filter
193
240
  params: { nprobe: 64 }, // optional, specify the search parameters
194
241
  limit: 1, // specify the number of nearest neighbors to return
@@ -197,6 +244,23 @@ const res = await client.search({
197
244
  });
198
245
  ```
199
246
 
247
+ The code snippet performs a vector search on the collection.
248
+
249
+ First, a random search vector is generated. Then, the `client.search()` method is called with several parameters:
250
+ `collection_name`: Required. Specifies the name of the Milvus collection to search.
251
+
252
+ `vectors`: Required. Specifies the vector used to compare other vectors in Milvus. The example code passes an array of floating-point numbers as the vector.
253
+
254
+ `filter` or `expr`: Optional. Specifies a filter to apply to the search query. The example code passes a filter that only includes vectors where the word_count field is greater than 0.
255
+
256
+ `params`: Optional. Specifies additional search parameters. The example code sets nprobe to 64, which controls the number of clusters to search during the query. By default, nothing will be set.
257
+
258
+ `limit` or `topk`: Optional. Specifies the number of nearest neighbors to return. The example code sets this to 1. By default, it will be `100`
259
+
260
+ `metric_type`: Optional. Specifies the metric used to calculate the similarity of two vectors. The example code sets this to `"L2"`. By default, it will be `"L2"`.
261
+
262
+ `output_fields`: Optional. Specifies which fields to include in the search results. The example code specifies the `book_id` and `word_count` fields, by default the node sdk will output all fields.
263
+
200
264
  ## Next Steps
201
265
 
202
266
  - [What is Milvus](https://milvus.io/)
@@ -1,6 +1,29 @@
1
- import { GRPCClient, ClientConfig } from '.';
2
1
  import { ChannelOptions } from '@grpc/grpc-js';
2
+ import { GRPCClient, ClientConfig } from '.';
3
+ /**
4
+ * Milvus Client class that extends GRPCClient and handles communication with Milvus server.
5
+ */
3
6
  export declare class MilvusClient extends GRPCClient {
7
+ /**
8
+ * Returns the SDK information.
9
+ * SDK information will be generated on the building phase
10
+ * @returns Object containing SDK version and recommended Milvus version.
11
+ */
12
+ static get sdkInfo(): {
13
+ version: string;
14
+ recommandMilvus: string;
15
+ };
16
+ /**
17
+ * Creates a new instance of MilvusClient.
18
+ * @param configOrAddress The Milvus server's address or client configuration object.
19
+ * @param ssl Whether to use SSL or not.
20
+ * @param username The username for authentication.
21
+ * @param password The password for authentication.
22
+ * @param channelOptions Additional channel options for gRPC.
23
+ */
4
24
  constructor(configOrAddress: ClientConfig | string, ssl?: boolean, username?: string, password?: string, channelOptions?: ChannelOptions);
25
+ /**
26
+ * Overloads the original connect function in GRPCClient to add additional functionality.
27
+ */
5
28
  connect(): void;
6
29
  }
@@ -14,18 +14,52 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __importDefault = (this && this.__importDefault) || function (mod) {
18
+ return (mod && mod.__esModule) ? mod : { "default": mod };
19
+ };
17
20
  Object.defineProperty(exports, "__esModule", { value: true });
18
21
  exports.MilvusClient = void 0;
19
22
  var _1 = require(".");
23
+ var sdk_json_1 = __importDefault(require("../sdk.json"));
24
+ /**
25
+ * Milvus Client class that extends GRPCClient and handles communication with Milvus server.
26
+ */
20
27
  var MilvusClient = /** @class */ (function (_super) {
21
28
  __extends(MilvusClient, _super);
29
+ /**
30
+ * Creates a new instance of MilvusClient.
31
+ * @param configOrAddress The Milvus server's address or client configuration object.
32
+ * @param ssl Whether to use SSL or not.
33
+ * @param username The username for authentication.
34
+ * @param password The password for authentication.
35
+ * @param channelOptions Additional channel options for gRPC.
36
+ */
22
37
  function MilvusClient(configOrAddress, ssl, username, password, channelOptions) {
23
- var _this = _super.call(this, configOrAddress, ssl, username, password, channelOptions) || this;
24
- // connect
38
+ var _this =
39
+ // setup the configuration
40
+ _super.call(this, configOrAddress, ssl, username, password, channelOptions) || this;
41
+ // connect here
25
42
  _this.connect();
26
43
  return _this;
27
44
  }
28
- // overload
45
+ Object.defineProperty(MilvusClient, "sdkInfo", {
46
+ /**
47
+ * Returns the SDK information.
48
+ * SDK information will be generated on the building phase
49
+ * @returns Object containing SDK version and recommended Milvus version.
50
+ */
51
+ get: function () {
52
+ return {
53
+ version: sdk_json_1.default.version,
54
+ recommandMilvus: sdk_json_1.default.milvusVersion,
55
+ };
56
+ },
57
+ enumerable: false,
58
+ configurable: true
59
+ });
60
+ /**
61
+ * Overloads the original connect function in GRPCClient to add additional functionality.
62
+ */
29
63
  MilvusClient.prototype.connect = function () {
30
64
  _super.prototype.connect.call(this);
31
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MilvusClient.js","sourceRoot":"","sources":["../../milvus/MilvusClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,sBAA6C;AAG7C;IAAkC,gCAAU;IAC1C,sBACE,eAAsC,EACtC,GAAa,EACb,QAAiB,EACjB,QAAiB,EACjB,cAA+B;QALjC,YAOE,kBAAM,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,SAIhE;QAFC,UAAU;QACV,KAAI,CAAC,OAAO,EAAE,CAAC;;IACjB,CAAC;IAED,WAAW;IACX,8BAAO,GAAP;QACE,iBAAM,OAAO,WAAE,CAAC;IAClB,CAAC;IACH,mBAAC;AAAD,CAAC,AAlBD,CAAkC,aAAU,GAkB3C;AAlBY,oCAAY"}
1
+ {"version":3,"file":"MilvusClient.js","sourceRoot":"","sources":["../../milvus/MilvusClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,sBAA6C;AAC7C,yDAAkC;AAElC;;GAEG;AACH;IAAkC,gCAAU;IAa1C;;;;;;;OAOG;IACH,sBACE,eAAsC,EACtC,GAAa,EACb,QAAiB,EACjB,QAAiB,EACjB,cAA+B;QALjC;QAOE,0BAA0B;QAC1B,kBAAM,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,SAGhE;QAFC,eAAe;QACf,KAAI,CAAC,OAAO,EAAE,CAAC;;IACjB,CAAC;IA1BD,sBAAW,uBAAO;QALlB;;;;WAIG;aACH;YACE,OAAO;gBACL,OAAO,EAAE,kBAAO,CAAC,OAAO;gBACxB,eAAe,EAAE,kBAAO,CAAC,aAAa;aACvC,CAAC;QACJ,CAAC;;;OAAA;IAuBD;;OAEG;IACH,8BAAO,GAAP;QACE,iBAAM,OAAO,WAAE,CAAC;IAClB,CAAC;IACH,mBAAC;AAAD,CAAC,AAxCD,CAAkC,aAAU,GAwC3C;AAxCY,oCAAY"}
@@ -0,0 +1,2 @@
1
+ export * from './ErrorReason';
2
+ export * from './Milvus';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // consts
18
+ __exportStar(require("./ErrorReason"), exports);
19
+ __exportStar(require("./Milvus"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../milvus/const/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS;AACT,gDAA8B;AAC9B,2CAAyB"}
@@ -1,15 +1,19 @@
1
1
  import { Root } from 'protobufjs';
2
2
  import { Client, ChannelOptions } from '@grpc/grpc-js';
3
- import { ClientConfig } from '.';
3
+ import { ClientConfig } from '..';
4
+ /**
5
+ * Base gRPC client, setup all configuration here
6
+ */
4
7
  export declare class BaseClient {
5
8
  client: Client | undefined;
6
9
  protoPath: string;
7
10
  schemaProto: Root;
8
11
  milvusProto: Root;
9
12
  config: ClientConfig;
13
+ serviceName: string;
10
14
  timeout: number;
11
15
  /**
12
- * setup the configuration object
16
+ * Sets up the configuration object for the gRPC client.
13
17
  *
14
18
  * @param configOrAddress The configuration object or the Milvus address as a string.
15
19
  * @param ssl Whether to use SSL or not. Default is false.
@@ -17,5 +21,4 @@ export declare class BaseClient {
17
21
  * @param password The password for authentication. Required if username is provided.
18
22
  */
19
23
  constructor(configOrAddress: ClientConfig | string, ssl?: boolean, username?: string, password?: string, channelOptions?: ChannelOptions);
20
- connect(): void;
21
24
  }
@@ -6,15 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BaseClient = void 0;
7
7
  var path_1 = __importDefault(require("path"));
8
8
  var protobufjs_1 = __importDefault(require("protobufjs"));
9
- var _1 = require(".");
10
- var utils_1 = require("../utils");
9
+ var __1 = require("..");
10
+ var utils_1 = require("../../utils");
11
11
  // path
12
- var protoPath = path_1.default.resolve(__dirname, '../proto/proto/milvus.proto');
13
- var schemaProtoPath = path_1.default.resolve(__dirname, '../proto/proto/schema.proto');
14
- // Base Client
12
+ var protoPath = path_1.default.resolve(__dirname, '../../proto/proto/milvus.proto');
13
+ var schemaProtoPath = path_1.default.resolve(__dirname, '../../proto/proto/schema.proto');
14
+ /**
15
+ * Base gRPC client, setup all configuration here
16
+ */
15
17
  var BaseClient = /** @class */ (function () {
16
18
  /**
17
- * setup the configuration object
19
+ * Sets up the configuration object for the gRPC client.
18
20
  *
19
21
  * @param configOrAddress The configuration object or the Milvus address as a string.
20
22
  * @param ssl Whether to use SSL or not. Default is false.
@@ -22,8 +24,10 @@ var BaseClient = /** @class */ (function () {
22
24
  * @param password The password for authentication. Required if username is provided.
23
25
  */
24
26
  function BaseClient(configOrAddress, ssl, username, password, channelOptions) {
25
- // timeout:
26
- this.timeout = _1.DEFAULT_CONNECT_TIMEOUT;
27
+ // The name of the Milvus service.
28
+ this.serviceName = 'milvus.proto.milvus.MilvusService';
29
+ // The timeout for connecting to the Milvus service.
30
+ this.timeout = __1.DEFAULT_CONNECT_TIMEOUT;
27
31
  var config;
28
32
  // If a configuration object is provided, use it. Otherwise, create a new object with the provided parameters.
29
33
  if (typeof configOrAddress === 'object') {
@@ -38,24 +42,22 @@ var BaseClient = /** @class */ (function () {
38
42
  channelOptions: channelOptions,
39
43
  };
40
44
  }
41
- // check if address is set
45
+ // Check if the Milvus address is set.
42
46
  if (!config.address) {
43
- throw new Error(_1.ERROR_REASONS.MILVUS_ADDRESS_IS_REQUIRED);
47
+ throw new Error(__1.ERROR_REASONS.MILVUS_ADDRESS_IS_REQUIRED);
44
48
  }
45
- // assign config
49
+ // Assign the configuration object.
46
50
  this.config = config;
47
- // load proto
51
+ // Load the Milvus protobuf.
48
52
  this.protoPath = protoPath;
49
53
  this.schemaProto = protobufjs_1.default.loadSync(schemaProtoPath);
50
54
  this.milvusProto = protobufjs_1.default.loadSync(protoPath);
51
- // setup timeout
55
+ // Set up the timeout for connecting to the Milvus service.
52
56
  this.timeout =
53
57
  typeof config.timeout === 'string'
54
58
  ? (0, utils_1.parseTimeToken)(config.timeout)
55
- : config.timeout || _1.DEFAULT_CONNECT_TIMEOUT;
59
+ : config.timeout || __1.DEFAULT_CONNECT_TIMEOUT;
56
60
  }
57
- // connect interface
58
- BaseClient.prototype.connect = function () { };
59
61
  return BaseClient;
60
62
  }());
61
63
  exports.BaseClient = BaseClient;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseClient.js","sourceRoot":"","sources":["../../../milvus/grpc/BaseClient.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAwB;AACxB,0DAA4C;AAE5C,wBAA0E;AAC1E,qCAA6C;AAE7C,OAAO;AACP,IAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,gCAAgC,CAAC,CAAC;AAC5E,IAAM,eAAe,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,gCAAgC,CAAC,CAAC;AAElF;;GAEG;AACH;IAiBE;;;;;;;OAOG;IACH,oBACE,eAAsC,EACtC,GAAa,EACb,QAAiB,EACjB,QAAiB,EACjB,cAA+B;QAnBjC,kCAAkC;QAClC,gBAAW,GAAW,mCAAmC,CAAC;QAE1D,oDAAoD;QACpD,YAAO,GAAW,2BAAuB,CAAC;QAiBxC,IAAI,MAAoB,CAAC;QAEzB,8GAA8G;QAC9G,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;YACvC,MAAM,GAAG,eAAe,CAAC;SAC1B;aAAM;YACL,MAAM,GAAG;gBACP,OAAO,EAAE,eAAe;gBACxB,GAAG,KAAA;gBACH,QAAQ,UAAA;gBACR,QAAQ,UAAA;gBACR,cAAc,gBAAA;aACf,CAAC;SACH;QAED,sCAAsC;QACtC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,iBAAa,CAAC,0BAA0B,CAAC,CAAC;SAC3D;QAED,mCAAmC;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,4BAA4B;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,oBAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,oBAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEhD,2DAA2D;QAC3D,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,2BAAuB,CAAC;IAClD,CAAC;IACH,iBAAC;AAAD,CAAC,AAjED,IAiEC;AAjEY,gCAAU"}
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './BaseClient';
2
- import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq, GetReplicaReq, RenameCollectionReq, GetLoadingProgressReq, GetLoadStateReq, BoolResponse, ResStatus, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse, GetLoadingProgressResponse, GetLoadStateResponse } from '.';
2
+ import { CreateCollectionReq, DescribeCollectionReq, DropCollectionReq, GetCollectionStatisticsReq, LoadCollectionReq, ReleaseLoadCollectionReq, ShowCollectionsReq, HasCollectionReq, CreateAliasReq, DropAliasReq, AlterAliasReq, CompactReq, GetCompactionStateReq, GetCompactionPlansReq, GetReplicaReq, RenameCollectionReq, GetLoadingProgressReq, GetLoadStateReq, BoolResponse, ResStatus, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse, GetLoadingProgressResponse, GetLoadStateResponse } from '..';
3
3
  /**
4
4
  * @see [collection operation examples](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
5
5
  */
@@ -74,10 +74,10 @@ var __rest = (this && this.__rest) || function (s, e) {
74
74
  };
75
75
  Object.defineProperty(exports, "__esModule", { value: true });
76
76
  exports.Collection = void 0;
77
- var utils_1 = require("../utils");
77
+ var utils_1 = require("../../utils");
78
78
  var BaseClient_1 = require("./BaseClient");
79
- var _1 = require(".");
80
- var utils_2 = require("../utils");
79
+ var __1 = require("..");
80
+ var utils_2 = require("../../utils");
81
81
  /**
82
82
  * @see [collection operation examples](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
83
83
  */
@@ -139,7 +139,7 @@ var Collection = /** @class */ (function (_super) {
139
139
  _b = data || {}, fields = _b.fields, collection_name = _b.collection_name, description = _b.description, _c = _b.consistency_level, consistency_level = _c === void 0 ? 'Bounded' : _c;
140
140
  // Check if fields and collection_name are present, otherwise throw an error.
141
141
  if (!(fields === null || fields === void 0 ? void 0 : fields.length) || !collection_name) {
142
- throw new Error(_1.ERROR_REASONS.CREATE_COLLECTION_CHECK_PARAMS);
142
+ throw new Error(__1.ERROR_REASONS.CREATE_COLLECTION_CHECK_PARAMS);
143
143
  }
144
144
  // Check if the fields are valid.
145
145
  (0, utils_1.checkCollectionFields)(fields);
@@ -156,7 +156,7 @@ var Collection = /** @class */ (function (_super) {
156
156
  };
157
157
  collectionParams = CollectionSchema.create(payload);
158
158
  schemaBytes = CollectionSchema.encode(collectionParams).finish();
159
- level = (_a = _1.ConsistencyLevelEnum[consistency_level]) !== null && _a !== void 0 ? _a : _1.ConsistencyLevelEnum.Bounded;
159
+ level = (_a = __1.ConsistencyLevelEnum[consistency_level]) !== null && _a !== void 0 ? _a : __1.ConsistencyLevelEnum.Bounded;
160
160
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'CreateCollection', __assign(__assign({}, data), { schema: schemaBytes, consistency_level: level }), data.timeout || this.timeout)];
161
161
  case 1:
162
162
  promise = _d.sent();
@@ -235,7 +235,7 @@ var Collection = /** @class */ (function (_super) {
235
235
  return __generator(this, function (_a) {
236
236
  switch (_a.label) {
237
237
  case 0: return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'ShowCollections', {
238
- type: data ? data.type : _1.ShowCollectionsType.All,
238
+ type: data ? data.type : __1.ShowCollectionsType.All,
239
239
  collection_names: (data === null || data === void 0 ? void 0 : data.collection_names) || [],
240
240
  }, (data === null || data === void 0 ? void 0 : data.timeout) || this.timeout)];
241
241
  case 1:
@@ -413,7 +413,7 @@ var Collection = /** @class */ (function (_super) {
413
413
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'LoadCollection', data, data.timeout || this.timeout)];
414
414
  case 1:
415
415
  promise = _a.sent();
416
- if (promise.error_code !== _1.ErrorCode.SUCCESS) {
416
+ if (promise.error_code !== __1.ErrorCode.SUCCESS) {
417
417
  throw new Error("ErrorCode: ".concat(promise.error_code, ". Reason: ").concat(promise.reason));
418
418
  }
419
419
  loadedPercentage = 0;
@@ -425,7 +425,7 @@ var Collection = /** @class */ (function (_super) {
425
425
  })];
426
426
  case 3:
427
427
  res = _a.sent();
428
- if (res.status.error_code !== _1.ErrorCode.SUCCESS) {
428
+ if (res.status.error_code !== __1.ErrorCode.SUCCESS) {
429
429
  throw new Error("ErrorCode: ".concat(res.status.error_code, ". Reason: ").concat(res.status.reason));
430
430
  }
431
431
  loadedPercentage = Number(res.progress);
@@ -592,7 +592,7 @@ var Collection = /** @class */ (function (_super) {
592
592
  case 0:
593
593
  (0, utils_1.checkCollectionName)(data);
594
594
  if (!data.alias) {
595
- throw new Error(_1.ERROR_REASONS.ALIAS_NAME_IS_REQUIRED);
595
+ throw new Error(__1.ERROR_REASONS.ALIAS_NAME_IS_REQUIRED);
596
596
  }
597
597
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'CreateAlias', data, data.timeout || this.timeout)];
598
598
  case 1:
@@ -635,7 +635,7 @@ var Collection = /** @class */ (function (_super) {
635
635
  switch (_a.label) {
636
636
  case 0:
637
637
  if (!data.alias) {
638
- throw new Error(_1.ERROR_REASONS.ALIAS_NAME_IS_REQUIRED);
638
+ throw new Error(__1.ERROR_REASONS.ALIAS_NAME_IS_REQUIRED);
639
639
  }
640
640
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'DropAlias', data, data.timeout || this.timeout)];
641
641
  case 1:
@@ -679,7 +679,7 @@ var Collection = /** @class */ (function (_super) {
679
679
  case 0:
680
680
  (0, utils_1.checkCollectionName)(data);
681
681
  if (!data.alias) {
682
- throw new Error(_1.ERROR_REASONS.ALIAS_NAME_IS_REQUIRED);
682
+ throw new Error(__1.ERROR_REASONS.ALIAS_NAME_IS_REQUIRED);
683
683
  }
684
684
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'AlterAlias', data, data.timeout || this.timeout)];
685
685
  case 1:
@@ -762,7 +762,7 @@ var Collection = /** @class */ (function (_super) {
762
762
  switch (_a.label) {
763
763
  case 0:
764
764
  if (!data || !data.compactionID) {
765
- throw new Error(_1.ERROR_REASONS.COMPACTIONID_IS_REQUIRED);
765
+ throw new Error(__1.ERROR_REASONS.COMPACTIONID_IS_REQUIRED);
766
766
  }
767
767
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetCompactionState', data, data.timeout || this.timeout)];
768
768
  case 1:
@@ -802,7 +802,7 @@ var Collection = /** @class */ (function (_super) {
802
802
  switch (_a.label) {
803
803
  case 0:
804
804
  if (!data || !data.compactionID) {
805
- throw new Error(_1.ERROR_REASONS.COMPACTIONID_IS_REQUIRED);
805
+ throw new Error(__1.ERROR_REASONS.COMPACTIONID_IS_REQUIRED);
806
806
  }
807
807
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetCompactionStateWithPlans', data, data.timeout || this.timeout)];
808
808
  case 1:
@@ -859,7 +859,7 @@ var Collection = /** @class */ (function (_super) {
859
859
  switch (_a.label) {
860
860
  case 0:
861
861
  if (!data || !data.collectionID) {
862
- throw new Error(_1.ERROR_REASONS.COLLECTION_ID_IS_REQUIRED);
862
+ throw new Error(__1.ERROR_REASONS.COLLECTION_ID_IS_REQUIRED);
863
863
  }
864
864
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetReplicas', data, data.timeout || this.timeout)];
865
865
  case 1:
@@ -902,7 +902,7 @@ var Collection = /** @class */ (function (_super) {
902
902
  switch (_a.label) {
903
903
  case 0:
904
904
  if (!data || !data.collection_name) {
905
- throw new Error(_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
905
+ throw new Error(__1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
906
906
  }
907
907
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetLoadingProgress', data, data.timeout || this.timeout)];
908
908
  case 1:
@@ -944,7 +944,7 @@ var Collection = /** @class */ (function (_super) {
944
944
  switch (_a.label) {
945
945
  case 0:
946
946
  if (!data || !data.collection_name) {
947
- throw new Error(_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
947
+ throw new Error(__1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
948
948
  }
949
949
  return [4 /*yield*/, (0, utils_1.promisify)(this.client, 'GetLoadState', data, data.timeout || this.timeout)];
950
950
  case 1:
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/grpc/Collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAOqB;AACrB,2CAA0C;AAC1C,wBAmCY;AACZ,qCAA+C;AAE/C;;GAEG;AACH;IAAgC,8BAAU;IAA1C;;IAi1BA,CAAC;IAh1BC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACG,qCAAgB,GAAtB,UA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erySegmentInfoReq, InsertReq, LoadBalanceReq, ImportReq, ListImportTasksReq, FlushResult, GetFlushStateResponse, GetMetricsResponse, GetQuerySegmentInfoResponse, MutationResult, QueryResults, ResStatus, SearchResults, ImportResponse, ListImportTasksResponse, GetMetricsRequest, QueryReq, SearchReq, SearchSimpleReq } from '.';
1
+ import { DataType, DeleteEntitiesReq, FlushReq, GetFlushStateReq, GetQuerySegmentInfoReq, InsertReq, LoadBalanceReq, ImportReq, ListImportTasksReq, FlushResult, GetFlushStateResponse, GetMetricsResponse, GetQuerySegmentInfoResponse, MutationResult, QueryResults, ResStatus, SearchResults, ImportResponse, ListImportTasksResponse, GetMetricsRequest, QueryReq, SearchReq, SearchSimpleReq } from '..';
2
2
  import { Collection } from './Collection';
3
3
  export declare class Data extends Collection {
4
4
  vectorTypes: DataType[];
@@ -197,8 +197,6 @@ export declare class Data extends Collection {
197
197
  * | :--- | :-- | :-- |
198
198
  * | segmentIDs | Array | The segment ids |
199
199
  * | 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 |
200
-
201
- *
202
200
  *
203
201
  * @returns
204
202
  * | Property | Description |