@zilliz/milvus2-sdk-node 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/milvus/Collection.d.ts +54 -1
- package/dist/milvus/Collection.js +90 -3
- package/dist/milvus/Collection.js.map +1 -1
- package/dist/milvus/const/ErrorReason.d.ts +9 -9
- package/dist/milvus/const/ErrorReason.js +9 -9
- package/dist/milvus/const/ErrorReason.js.map +1 -1
- package/dist/milvus/const/Milvus.d.ts +23 -19
- package/dist/milvus/const/Milvus.js +25 -31
- package/dist/milvus/const/Milvus.js.map +1 -1
- package/dist/milvus/types/Collection.d.ts +33 -16
- package/dist/milvus/types/Collection.js.map +1 -1
- package/dist/proto/proto/google/protobuf/descriptor.proto +10 -2
- package/dist/proto/proto/schema.proto +5 -1
- package/dist/sdk.json +1 -1
- package/dist/utils/Format.d.ts +20 -1
- package/dist/utils/Format.js +43 -7
- package/dist/utils/Format.js.map +1 -1
- package/dist/utils/test.d.ts +1 -1
- package/dist/utils/test.js.map +1 -1
- package/package.json +1 -1
|
@@ -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, BoolResponse, ResStatus, CompactionResponse, DescribeCollectionResponse, GetCompactionPlansResponse, GetCompactionStateResponse, ShowCollectionsResponse, StatisticsResponse, ReplicasResponse } 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
|
*/
|
|
@@ -473,4 +473,57 @@ export declare class Collection extends BaseClient {
|
|
|
473
473
|
* ```
|
|
474
474
|
*/
|
|
475
475
|
getReplicas(data: GetReplicaReq): Promise<ReplicasResponse>;
|
|
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
|
+
*/
|
|
502
|
+
getLoadingProgress(data: GetLoadingProgressReq): Promise<GetLoadingProgressResponse>;
|
|
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
|
+
*/
|
|
528
|
+
getLoadState(data: GetLoadStateReq): Promise<GetLoadStateResponse>;
|
|
476
529
|
}
|
|
@@ -66,6 +66,7 @@ exports.Collection = void 0;
|
|
|
66
66
|
var utils_1 = require("../utils");
|
|
67
67
|
var BaseClient_1 = require("./BaseClient");
|
|
68
68
|
var _1 = require(".");
|
|
69
|
+
var utils_2 = require("../utils");
|
|
69
70
|
/**
|
|
70
71
|
* @see [collection operation examples](https://github.com/milvus-io/milvus-sdk-node/blob/main/example/Collection.ts)
|
|
71
72
|
*/
|
|
@@ -119,7 +120,7 @@ var Collection = /** @class */ (function (_super) {
|
|
|
119
120
|
*/
|
|
120
121
|
Collection.prototype.createCollection = function (data) {
|
|
121
122
|
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
var _a, fields, collection_name, description, _b, consistency_level, CollectionSchema, FieldSchema, payload, collectionParams,
|
|
123
|
+
var _a, fields, collection_name, description, _b, consistency_level, CollectionSchema, FieldSchema, payload, collectionParams, schemaBytes, level, promise;
|
|
123
124
|
return __generator(this, function (_c) {
|
|
124
125
|
switch (_c.label) {
|
|
125
126
|
case 0:
|
|
@@ -136,16 +137,17 @@ var Collection = /** @class */ (function (_super) {
|
|
|
136
137
|
fields: [],
|
|
137
138
|
};
|
|
138
139
|
data.fields.forEach(function (field) {
|
|
140
|
+
field = (0, utils_2.assignTypeParams)(field);
|
|
139
141
|
var value = __assign(__assign({}, field), { typeParams: (0, utils_1.parseToKeyValue)(field.type_params), dataType: field.data_type, isPrimaryKey: field.is_primary_key });
|
|
140
142
|
var fieldParams = FieldSchema.create(value);
|
|
141
143
|
payload.fields.push(fieldParams);
|
|
142
144
|
});
|
|
143
145
|
collectionParams = CollectionSchema.create(payload);
|
|
144
|
-
|
|
146
|
+
schemaBytes = CollectionSchema.encode(collectionParams).finish();
|
|
145
147
|
level = Object.keys(_1.ConsistencyLevelEnum).includes(consistency_level)
|
|
146
148
|
? _1.ConsistencyLevelEnum[consistency_level]
|
|
147
149
|
: _1.ConsistencyLevelEnum['Bounded'];
|
|
148
|
-
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'CreateCollection', __assign(__assign({}, data), { schema:
|
|
150
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'CreateCollection', __assign(__assign({}, data), { schema: schemaBytes, consistency_level: level }), data.timeout)];
|
|
149
151
|
case 1:
|
|
150
152
|
promise = _c.sent();
|
|
151
153
|
return [2 /*return*/, promise];
|
|
@@ -853,6 +855,91 @@ var Collection = /** @class */ (function (_super) {
|
|
|
853
855
|
});
|
|
854
856
|
});
|
|
855
857
|
};
|
|
858
|
+
/**
|
|
859
|
+
* Get loading progress of a collection
|
|
860
|
+
*
|
|
861
|
+
* @param data
|
|
862
|
+
* | Property | Type | Description |
|
|
863
|
+
* | :-- | :-- | :-- |
|
|
864
|
+
* | collection_name | string | the name of the collection |
|
|
865
|
+
* | 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 |
|
|
866
|
+
*
|
|
867
|
+
* @returns
|
|
868
|
+
* | Property | Description |
|
|
869
|
+
* | :-- | :-- |
|
|
870
|
+
* | status | { error_code: number, reason: string } |
|
|
871
|
+
* | total_row_num | the total number of rows in the collection |
|
|
872
|
+
* | total_loaded_row_num | the total number of loaded rows in the collection |
|
|
873
|
+
*
|
|
874
|
+
* @throws {Error} if `collection_name` property is not present in `data`
|
|
875
|
+
*
|
|
876
|
+
* #### Example
|
|
877
|
+
*
|
|
878
|
+
* ```
|
|
879
|
+
* new milvusClient(MILUVS_ADDRESS).getLoadingProgress({
|
|
880
|
+
* collection_name: 'my_collection',
|
|
881
|
+
* });
|
|
882
|
+
* ```
|
|
883
|
+
*/
|
|
884
|
+
Collection.prototype.getLoadingProgress = function (data) {
|
|
885
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
886
|
+
var res;
|
|
887
|
+
return __generator(this, function (_a) {
|
|
888
|
+
switch (_a.label) {
|
|
889
|
+
case 0:
|
|
890
|
+
if (!data || !data.collection_name) {
|
|
891
|
+
throw new Error(_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
|
|
892
|
+
}
|
|
893
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'GetLoadingProgress', data, data.timeout)];
|
|
894
|
+
case 1:
|
|
895
|
+
res = _a.sent();
|
|
896
|
+
return [2 /*return*/, res];
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
});
|
|
900
|
+
};
|
|
901
|
+
/**
|
|
902
|
+
* Get the loading state of a collection
|
|
903
|
+
*
|
|
904
|
+
* @param data
|
|
905
|
+
* | Property | Type | Description |
|
|
906
|
+
* | :-- | :-- | :-- |
|
|
907
|
+
* | collection_name | string | the name of the collection |
|
|
908
|
+
* | 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 |
|
|
909
|
+
*
|
|
910
|
+
* @returns
|
|
911
|
+
* | Property | Description |
|
|
912
|
+
* | :-- | :-- |
|
|
913
|
+
* | status | { error_code: number, reason: string } |
|
|
914
|
+
* | state | the loading state of the collection |
|
|
915
|
+
*
|
|
916
|
+
* @throws {Error} if `collection_name` property is not present in `data`
|
|
917
|
+
*
|
|
918
|
+
* #### Example
|
|
919
|
+
*
|
|
920
|
+
* ```
|
|
921
|
+
* new milvusClient(MILUVS_ADDRESS).getLoadState({
|
|
922
|
+
* collection_name: 'my_collection',
|
|
923
|
+
* });
|
|
924
|
+
* ```
|
|
925
|
+
*/
|
|
926
|
+
Collection.prototype.getLoadState = function (data) {
|
|
927
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
928
|
+
var res;
|
|
929
|
+
return __generator(this, function (_a) {
|
|
930
|
+
switch (_a.label) {
|
|
931
|
+
case 0:
|
|
932
|
+
if (!data || !data.collection_name) {
|
|
933
|
+
throw new Error(_1.ERROR_REASONS.COLLECTION_NAME_IS_REQUIRED);
|
|
934
|
+
}
|
|
935
|
+
return [4 /*yield*/, (0, utils_1.promisify)(this.grpcClient, 'GetLoadState', data, data.timeout)];
|
|
936
|
+
case 1:
|
|
937
|
+
res = _a.sent();
|
|
938
|
+
return [2 /*return*/, res];
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
};
|
|
856
943
|
return Collection;
|
|
857
944
|
}(BaseClient_1.BaseClient));
|
|
858
945
|
exports.Collection = Collection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../milvus/Collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAMkB;AAClB,2CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../milvus/Collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAAA,iBAAS,EACzB,IAAI,CAAC,UAAU,EACf,aAAa,EACb,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,GAAG,GAAG,SAKX;wBACD,sBAAO,GAAG,EAAC;;;;KACZ;IAED;;;;;;;;;;;;;;;;;;;;;;;;;KAyBC;IACK,uCAAkB,GAAxB,UACE,IAA2B;;;;;;wBAE3B,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;4BAClC,MAAM,IAAI,KAAK,CAAC,gBAAa,CAAC,2BAA2B,CAAC,CAAC;yBAC5D;wBACW,qBAAM,IAAA,iBAAS,EACzB,IAAI,CAAC,UAAU,EACf,oBAAoB,EACpB,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,GAAG,GAAG,SAKX;wBACD,sBAAO,GAAG,EAAC;;;;KACZ;IAED;;;;;;;;;;;;;;;;;;;;;;;;KAwBC;IACK,iCAAY,GAAlB,UAAmB,IAAqB;;;;;;wBACtC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;4BAClC,MAAM,IAAI,KAAK,CAAC,gBAAa,CAAC,2BAA2B,CAAC,CAAC;yBAC5D;wBACW,qBAAM,IAAA,iBAAS,EACzB,IAAI,CAAC,UAAU,EACf,cAAc,EACd,IAAI,EACJ,IAAI,CAAC,OAAO,CACb,EAAA;;wBALK,GAAG,GAAG,SAKX;wBACD,sBAAO,GAAG,EAAC;;;;KACZ;IACH,iBAAC;AAAD,CAAC,AA10BD,CAAgC,uBAAU,GA00BzC;AA10BY,gCAAU"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export declare enum ERROR_REASONS {
|
|
2
2
|
MILVUS_ADDRESS_IS_REQUIRED = "Milvus addres is required.",
|
|
3
|
-
CREATE_COLLECTION_CHECK_PARAMS = "fields and collection_name
|
|
3
|
+
CREATE_COLLECTION_CHECK_PARAMS = "fields and collection_name are needed",
|
|
4
4
|
CREATE_COLLECTION_CHECK_PRIMARY_KEY = "Fields must contain one data_type = int64 and is_primary_key = true",
|
|
5
5
|
CREATE_COLLECTION_CHECK_VECTOR_FIELD_EXIST = "Fields must contain one vector field column",
|
|
6
|
-
CREATE_COLLECTION_CHECK_MISS_DIM = "Vector field
|
|
6
|
+
CREATE_COLLECTION_CHECK_MISS_DIM = "Vector field needs dim in type params",
|
|
7
7
|
CREATE_COLLECTION_CHECK_BINARY_DIM = "Binary vector field dim need mutiples of 8",
|
|
8
8
|
COLLECTION_NAME_IS_REQUIRED = "Collection name is required",
|
|
9
9
|
COLLECTION_ID_IS_REQUIRED = "Collection ID is required",
|
|
10
10
|
COLLECTION_PARTITION_NAME_ARE_REQUIRED = "Collection and partition name are required",
|
|
11
11
|
INSERT_CHECK_MISS_FIELD = "Insert fail: missing some field for this collection in line ",
|
|
12
12
|
INSERT_CHECK_FILEDS_DATA_IS_REQUIRED = "fields_data is required as array.",
|
|
13
|
-
INSERT_CHECK_WRONG_FIELD = "Insert fail: some field
|
|
14
|
-
INSERT_CHECK_WRONG_DIM = "Insert fail: Binary vector data length
|
|
15
|
-
INSERT_CHECK_WRONG_DATA_TYPE = "Some field type in collection schema is not belong to DataType.
|
|
13
|
+
INSERT_CHECK_WRONG_FIELD = "Insert fail: some field does not exist for this collection in line",
|
|
14
|
+
INSERT_CHECK_WRONG_DIM = "Insert fail: Binary vector data length needs to be (dimension / 8) ",
|
|
15
|
+
INSERT_CHECK_WRONG_DATA_TYPE = "Some field type in collection schema is not belong to DataType. ",
|
|
16
16
|
SEARCH_MISS_VECTOR_TYPE = "Miss vector_type, need to be binary or float vector field type.",
|
|
17
|
-
SEARCH_NOT_FIND_VECTOR_FIELD = "Your anns_field
|
|
18
|
-
SEARCH_DIM_NOT_MATCH = "Your vector dimension
|
|
19
|
-
SEARCH_PARAMS_IS_REQUIRED = "search_params must
|
|
17
|
+
SEARCH_NOT_FIND_VECTOR_FIELD = "Your anns_field was not found in this collection.",
|
|
18
|
+
SEARCH_DIM_NOT_MATCH = "Your vector dimension does not match your anns_field dimension",
|
|
19
|
+
SEARCH_PARAMS_IS_REQUIRED = "search_params must contain anns_field, metric_type, topk and params.",
|
|
20
20
|
SEARCH_ROUND_DECIMAL_NOT_VALID = "round_decimal should be an integer greater than -2 and less than 7",
|
|
21
|
-
DELETE_PARAMS_CHECK = "Collection name and expr
|
|
21
|
+
DELETE_PARAMS_CHECK = "Collection name and expr are required.",
|
|
22
22
|
GET_METRIC_CHECK_PARAMS = "request.metric_type is required.",
|
|
23
23
|
GET_FLUSH_STATE_CHECK_PARAMS = "segmentIDs is required as array",
|
|
24
24
|
LOAD_BALANCE_CHECK_PARAMS = "src_nodeID is required",
|
|
@@ -4,25 +4,25 @@ exports.ERROR_REASONS = void 0;
|
|
|
4
4
|
var ERROR_REASONS;
|
|
5
5
|
(function (ERROR_REASONS) {
|
|
6
6
|
ERROR_REASONS["MILVUS_ADDRESS_IS_REQUIRED"] = "Milvus addres is required.";
|
|
7
|
-
ERROR_REASONS["CREATE_COLLECTION_CHECK_PARAMS"] = "fields and collection_name
|
|
7
|
+
ERROR_REASONS["CREATE_COLLECTION_CHECK_PARAMS"] = "fields and collection_name are needed";
|
|
8
8
|
ERROR_REASONS["CREATE_COLLECTION_CHECK_PRIMARY_KEY"] = "Fields must contain one data_type = int64 and is_primary_key = true";
|
|
9
9
|
ERROR_REASONS["CREATE_COLLECTION_CHECK_VECTOR_FIELD_EXIST"] = "Fields must contain one vector field column";
|
|
10
|
-
ERROR_REASONS["CREATE_COLLECTION_CHECK_MISS_DIM"] = "Vector field
|
|
10
|
+
ERROR_REASONS["CREATE_COLLECTION_CHECK_MISS_DIM"] = "Vector field needs dim in type params";
|
|
11
11
|
ERROR_REASONS["CREATE_COLLECTION_CHECK_BINARY_DIM"] = "Binary vector field dim need mutiples of 8";
|
|
12
12
|
ERROR_REASONS["COLLECTION_NAME_IS_REQUIRED"] = "Collection name is required";
|
|
13
13
|
ERROR_REASONS["COLLECTION_ID_IS_REQUIRED"] = "Collection ID is required";
|
|
14
14
|
ERROR_REASONS["COLLECTION_PARTITION_NAME_ARE_REQUIRED"] = "Collection and partition name are required";
|
|
15
15
|
ERROR_REASONS["INSERT_CHECK_MISS_FIELD"] = "Insert fail: missing some field for this collection in line ";
|
|
16
16
|
ERROR_REASONS["INSERT_CHECK_FILEDS_DATA_IS_REQUIRED"] = "fields_data is required as array.";
|
|
17
|
-
ERROR_REASONS["INSERT_CHECK_WRONG_FIELD"] = "Insert fail: some field
|
|
18
|
-
ERROR_REASONS["INSERT_CHECK_WRONG_DIM"] = "Insert fail: Binary vector data length
|
|
19
|
-
ERROR_REASONS["INSERT_CHECK_WRONG_DATA_TYPE"] = "Some field type in collection schema is not belong to DataType.
|
|
17
|
+
ERROR_REASONS["INSERT_CHECK_WRONG_FIELD"] = "Insert fail: some field does not exist for this collection in line";
|
|
18
|
+
ERROR_REASONS["INSERT_CHECK_WRONG_DIM"] = "Insert fail: Binary vector data length needs to be (dimension / 8) ";
|
|
19
|
+
ERROR_REASONS["INSERT_CHECK_WRONG_DATA_TYPE"] = "Some field type in collection schema is not belong to DataType. ";
|
|
20
20
|
ERROR_REASONS["SEARCH_MISS_VECTOR_TYPE"] = "Miss vector_type, need to be binary or float vector field type.";
|
|
21
|
-
ERROR_REASONS["SEARCH_NOT_FIND_VECTOR_FIELD"] = "Your anns_field
|
|
22
|
-
ERROR_REASONS["SEARCH_DIM_NOT_MATCH"] = "Your vector dimension
|
|
23
|
-
ERROR_REASONS["SEARCH_PARAMS_IS_REQUIRED"] = "search_params must
|
|
21
|
+
ERROR_REASONS["SEARCH_NOT_FIND_VECTOR_FIELD"] = "Your anns_field was not found in this collection.";
|
|
22
|
+
ERROR_REASONS["SEARCH_DIM_NOT_MATCH"] = "Your vector dimension does not match your anns_field dimension";
|
|
23
|
+
ERROR_REASONS["SEARCH_PARAMS_IS_REQUIRED"] = "search_params must contain anns_field, metric_type, topk and params.";
|
|
24
24
|
ERROR_REASONS["SEARCH_ROUND_DECIMAL_NOT_VALID"] = "round_decimal should be an integer greater than -2 and less than 7";
|
|
25
|
-
ERROR_REASONS["DELETE_PARAMS_CHECK"] = "Collection name and expr
|
|
25
|
+
ERROR_REASONS["DELETE_PARAMS_CHECK"] = "Collection name and expr are required.";
|
|
26
26
|
ERROR_REASONS["GET_METRIC_CHECK_PARAMS"] = "request.metric_type is required.";
|
|
27
27
|
ERROR_REASONS["GET_FLUSH_STATE_CHECK_PARAMS"] = "segmentIDs is required as array";
|
|
28
28
|
ERROR_REASONS["LOAD_BALANCE_CHECK_PARAMS"] = "src_nodeID is required";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorReason.js","sourceRoot":"","sources":["../../../milvus/const/ErrorReason.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAgDX;AAhDD,WAAY,aAAa;IACvB,0EAAyD,CAAA;IAEzD,
|
|
1
|
+
{"version":3,"file":"ErrorReason.js","sourceRoot":"","sources":["../../../milvus/const/ErrorReason.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAgDX;AAhDD,WAAY,aAAa;IACvB,0EAAyD,CAAA;IAEzD,yFAAwE,CAAA;IACxE,4HAA2G,CAAA;IAC3G,2GAA0F,CAAA;IAC1F,2FAA0E,CAAA;IAC1E,kGAAiF,CAAA;IAEjF,4EAA2D,CAAA;IAC3D,wEAAuD,CAAA;IACvD,sGAAqF,CAAA;IAErF,yGAAwF,CAAA;IACxF,2FAA0E,CAAA;IAC1E,gHAA+F,CAAA;IAC/F,+GAA8F,CAAA;IAC9F,kHAAiG,CAAA;IAEjG,4GAA2F,CAAA;IAC3F,mGAAkF,CAAA;IAClF,wGAAuF,CAAA;IACvF,mHAAkG,CAAA;IAClG,sHAAqG,CAAA;IAErG,+EAA8D,CAAA;IAE9D,6EAA4D,CAAA;IAE5D,iFAAgE,CAAA;IAEhE,qEAAoD,CAAA;IAEpD,4EAA2D,CAAA;IAE3D,6DAA4C,CAAA;IAE5C,sEAAqD,CAAA;IAErD,iFAAgE,CAAA;IAChE,2GAA0F,CAAA;IAE1F,8DAA6C,CAAA;IAE7C,iGAAgF,CAAA;IAEhF,wDAAuC,CAAA;IACvC,wDAAuC,CAAA;AACzC,CAAC,EAhDW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAgDxB"}
|
|
@@ -67,27 +67,25 @@ export declare enum StateCode {
|
|
|
67
67
|
StandBy = 3
|
|
68
68
|
}
|
|
69
69
|
export declare enum MetricType {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
SUPERSTRUCTURE = 7
|
|
70
|
+
L2 = "L2",
|
|
71
|
+
IP = "IP",
|
|
72
|
+
HAMMING = "HAMMING",
|
|
73
|
+
JACCARD = "JACCARD",
|
|
74
|
+
TANIMOTO = "TANIMOTO",
|
|
75
|
+
SUBSTRUCTURE = "SUBSTRUCTURE",
|
|
76
|
+
SUPERSTRUCTURE = "SUPERSTRUCTURE"
|
|
78
77
|
}
|
|
79
78
|
export declare enum IndexType {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
ANNOY = 12
|
|
79
|
+
FLAT = "FLAT",
|
|
80
|
+
IVF_FLAT = "IVF_FLAT",
|
|
81
|
+
IVF_SQ8 = "IVF_SQ8",
|
|
82
|
+
IVF_PQ = "IVF_PQ",
|
|
83
|
+
HNSW = "HNSW",
|
|
84
|
+
ANNOY = "ANNOY",
|
|
85
|
+
BIN_FLAT = "BIN_FLAT",
|
|
86
|
+
BIN_IVF_FLAT = "BIN_IVF_FLAT",
|
|
87
|
+
DISKANN = "DISKANN",
|
|
88
|
+
AUTOINDEX = "AUTOINDEX"
|
|
91
89
|
}
|
|
92
90
|
export declare enum MsgType {
|
|
93
91
|
Undefined = 0,
|
|
@@ -270,3 +268,9 @@ export declare const Privileges: {
|
|
|
270
268
|
LoadBalance: CollectionPrivileges.LoadBalance;
|
|
271
269
|
};
|
|
272
270
|
export declare const DEFAULT_RESOURCE_GROUP = "__default_resource_group";
|
|
271
|
+
export declare enum LoadState {
|
|
272
|
+
LoadStateNotExist = "LoadStateNotExist",
|
|
273
|
+
LoadStateNotLoad = "LoadStateNotLoad",
|
|
274
|
+
LoadStateLoading = "LoadStateLoading",
|
|
275
|
+
LoadStateLoaded = "LoadStateLoaded"
|
|
276
|
+
}
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.DEFAULT_RESOURCE_GROUP = exports.Privileges = exports.UserPrivileges = exports.GlobalPrivileges = exports.CollectionPrivileges = exports.RbacObjects = exports.Roles = exports.OperatePrivilegeType = exports.OperateUserRoleType = exports.DataTypeMap = exports.DataType = exports.MsgType = exports.IndexType = exports.MetricType = exports.StateCode = exports.ObjectPrivilege = exports.ObjectType = exports.ImportState = exports.CompactionState = exports.SegmentState = exports.ConsistencyLevelEnum = exports.DEFAULT_CONNECT_TIMEOUT = exports.DEFAULT_MILVUS_PORT = void 0;
|
|
14
|
+
exports.LoadState = exports.DEFAULT_RESOURCE_GROUP = exports.Privileges = exports.UserPrivileges = exports.GlobalPrivileges = exports.CollectionPrivileges = exports.RbacObjects = exports.Roles = exports.OperatePrivilegeType = exports.OperateUserRoleType = exports.DataTypeMap = exports.DataType = exports.MsgType = exports.IndexType = exports.MetricType = exports.StateCode = exports.ObjectPrivilege = exports.ObjectType = exports.ImportState = exports.CompactionState = exports.SegmentState = exports.ConsistencyLevelEnum = exports.DEFAULT_CONNECT_TIMEOUT = exports.DEFAULT_MILVUS_PORT = void 0;
|
|
15
15
|
exports.DEFAULT_MILVUS_PORT = 19530; // default milvus port
|
|
16
16
|
exports.DEFAULT_CONNECT_TIMEOUT = 10 * 1000; // 10s
|
|
17
17
|
var ErrorCode;
|
|
@@ -147,46 +147,33 @@ var StateCode;
|
|
|
147
147
|
})(StateCode = exports.StateCode || (exports.StateCode = {}));
|
|
148
148
|
var MetricType;
|
|
149
149
|
(function (MetricType) {
|
|
150
|
-
MetricType[MetricType["GHOST"] = 0] = "GHOST";
|
|
151
150
|
// L2 euclidean distance
|
|
152
|
-
MetricType[
|
|
151
|
+
MetricType["L2"] = "L2";
|
|
153
152
|
// IP inner product
|
|
154
|
-
MetricType[
|
|
153
|
+
MetricType["IP"] = "IP";
|
|
155
154
|
// HAMMING hamming distance
|
|
156
|
-
MetricType[
|
|
155
|
+
MetricType["HAMMING"] = "HAMMING";
|
|
157
156
|
// JACCARD jaccard distance
|
|
158
|
-
MetricType[
|
|
157
|
+
MetricType["JACCARD"] = "JACCARD";
|
|
159
158
|
// TANIMOTO tanimoto distance
|
|
160
|
-
MetricType[
|
|
159
|
+
MetricType["TANIMOTO"] = "TANIMOTO";
|
|
161
160
|
// SUBSTRUCTURE substructure distance
|
|
162
|
-
MetricType[
|
|
161
|
+
MetricType["SUBSTRUCTURE"] = "SUBSTRUCTURE";
|
|
163
162
|
// SUPERSTRUCTURE superstructure
|
|
164
|
-
MetricType[
|
|
163
|
+
MetricType["SUPERSTRUCTURE"] = "SUPERSTRUCTURE";
|
|
165
164
|
})(MetricType = exports.MetricType || (exports.MetricType = {}));
|
|
166
165
|
var IndexType;
|
|
167
166
|
(function (IndexType) {
|
|
168
|
-
|
|
169
|
-
IndexType[
|
|
170
|
-
|
|
171
|
-
IndexType[
|
|
172
|
-
|
|
173
|
-
IndexType[
|
|
174
|
-
|
|
175
|
-
IndexType[
|
|
176
|
-
|
|
177
|
-
IndexType[
|
|
178
|
-
// IVFSQ8H ivfsq8h
|
|
179
|
-
IndexType[IndexType["IVFSQ8H"] = 5] = "IVFSQ8H";
|
|
180
|
-
// IVFPQ ivfpq
|
|
181
|
-
IndexType[IndexType["IVFPQ"] = 6] = "IVFPQ";
|
|
182
|
-
// SPTAGKDT sptagkdt
|
|
183
|
-
IndexType[IndexType["SPTAGKDT"] = 7] = "SPTAGKDT";
|
|
184
|
-
// SPTAGBKT sptagbkt
|
|
185
|
-
IndexType[IndexType["SPTAGBKT"] = 8] = "SPTAGBKT";
|
|
186
|
-
// HNSW hnsw
|
|
187
|
-
IndexType[IndexType["HNSW"] = 11] = "HNSW";
|
|
188
|
-
// ANNOY annoy
|
|
189
|
-
IndexType[IndexType["ANNOY"] = 12] = "ANNOY";
|
|
167
|
+
IndexType["FLAT"] = "FLAT";
|
|
168
|
+
IndexType["IVF_FLAT"] = "IVF_FLAT";
|
|
169
|
+
IndexType["IVF_SQ8"] = "IVF_SQ8";
|
|
170
|
+
IndexType["IVF_PQ"] = "IVF_PQ";
|
|
171
|
+
IndexType["HNSW"] = "HNSW";
|
|
172
|
+
IndexType["ANNOY"] = "ANNOY";
|
|
173
|
+
IndexType["BIN_FLAT"] = "BIN_FLAT";
|
|
174
|
+
IndexType["BIN_IVF_FLAT"] = "BIN_IVF_FLAT";
|
|
175
|
+
IndexType["DISKANN"] = "DISKANN";
|
|
176
|
+
IndexType["AUTOINDEX"] = "AUTOINDEX";
|
|
190
177
|
})(IndexType = exports.IndexType || (exports.IndexType = {}));
|
|
191
178
|
var MsgType;
|
|
192
179
|
(function (MsgType) {
|
|
@@ -372,4 +359,11 @@ var UserPrivileges;
|
|
|
372
359
|
})(UserPrivileges = exports.UserPrivileges || (exports.UserPrivileges = {}));
|
|
373
360
|
exports.Privileges = __assign(__assign(__assign({}, CollectionPrivileges), UserPrivileges), GlobalPrivileges);
|
|
374
361
|
exports.DEFAULT_RESOURCE_GROUP = '__default_resource_group';
|
|
362
|
+
var LoadState;
|
|
363
|
+
(function (LoadState) {
|
|
364
|
+
LoadState["LoadStateNotExist"] = "LoadStateNotExist";
|
|
365
|
+
LoadState["LoadStateNotLoad"] = "LoadStateNotLoad";
|
|
366
|
+
LoadState["LoadStateLoading"] = "LoadStateLoading";
|
|
367
|
+
LoadState["LoadStateLoaded"] = "LoadStateLoaded";
|
|
368
|
+
})(LoadState = exports.LoadState || (exports.LoadState = {}));
|
|
375
369
|
//# sourceMappingURL=Milvus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Milvus.js","sourceRoot":"","sources":["../../../milvus/const/Milvus.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAa,QAAA,mBAAmB,GAAG,KAAK,CAAC,CAAC,sBAAsB;AACnD,QAAA,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM;AAExD,IAAK,SA0DJ;AA1DD,WAAK,SAAS;IACZ,+CAAW,CAAA;IACX,+DAAmB,CAAA;IACnB,2DAAiB,CAAA;IACjB,iEAAoB,CAAA;IACpB,uEAAuB,CAAA;IACvB,+DAAmB,CAAA;IACnB,iEAAoB,CAAA;IACpB,iEAAoB,CAAA;IACpB,2EAAyB,CAAA;IACzB,wDAAgB,CAAA;IAChB,kEAAqB,CAAA;IACrB,gEAAoB,CAAA;IACpB,wEAAwB,CAAA;IACxB,0DAAiB,CAAA;IACjB,sDAAe,CAAA;IACf,wDAAgB,CAAA;IAChB,sEAAuB,CAAA;IACvB,kEAAqB,CAAA;IACrB,sEAAuB,CAAA;IACvB,kEAAqB,CAAA;IACrB,gEAAoB,CAAA;IACpB,0DAAiB,CAAA;IACjB,oEAAsB,CAAA;IACtB,wDAAgB,CAAA;IAChB,4DAAkB,CAAA;IAClB,gEAAoB,CAAA;IACpB,gFAA4B,CAAA;IAC5B,8EAA2B,CAAA;IAC3B,gFAA4B,CAAA;IAC5B,gFAA4B,CAAA;IAC5B,gFAA4B,CAAA;IAC5B,0EAAyB,CAAA;IACzB,0EAAyB,CAAA;IACzB,8DAAmB,CAAA;IACnB,oEAAsB,CAAA;IACtB,gEAAoB,CAAA;IACpB,8EAA2B,CAAA;IAC3B,oEAAsB,CAAA;IACtB,oEAAsB,CAAA;IACtB,4EAA0B,CAAA;I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,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,kDAAqC,CAAA;IACrC,kDAAqC,CAAA;IACrC,gDAAmC,CAAA;AACrC,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResStatus, KeyValuePair, GrpcTimeOut, TimeStamp, TimeStampArray } from './Common';
|
|
2
|
-
import { ConsistencyLevelEnum, CompactionState, DataType } from '../const/Milvus';
|
|
2
|
+
import { ConsistencyLevelEnum, CompactionState, DataType, LoadState } from '../const/Milvus';
|
|
3
3
|
export interface FieldSchema {
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
@@ -16,28 +16,31 @@ export interface CollectionData {
|
|
|
16
16
|
loadedPercentage: string;
|
|
17
17
|
}
|
|
18
18
|
export interface ShardReplica {
|
|
19
|
-
leaderID:
|
|
19
|
+
leaderID: string;
|
|
20
20
|
leader_addr: string;
|
|
21
21
|
dm_channel_name: string;
|
|
22
|
-
node_ids:
|
|
22
|
+
node_ids: string[];
|
|
23
23
|
}
|
|
24
24
|
export interface ReplicaInfo {
|
|
25
|
-
replicaID:
|
|
26
|
-
collectionID:
|
|
27
|
-
partition_ids:
|
|
25
|
+
replicaID: string;
|
|
26
|
+
collectionID: string;
|
|
27
|
+
partition_ids: string[];
|
|
28
28
|
shard_replicas: ShardReplica[];
|
|
29
|
-
node_ids:
|
|
29
|
+
node_ids: string[];
|
|
30
30
|
}
|
|
31
|
+
export type TypeParam = string | number;
|
|
32
|
+
export type TypeParamKey = 'dim' | 'max_length';
|
|
31
33
|
export interface FieldType {
|
|
32
34
|
name: string;
|
|
33
|
-
description
|
|
35
|
+
description?: string;
|
|
34
36
|
data_type?: DataType;
|
|
35
37
|
is_primary_key?: boolean;
|
|
36
38
|
type_params?: {
|
|
37
|
-
|
|
38
|
-
max_length?: string;
|
|
39
|
+
[key: string]: TypeParam;
|
|
39
40
|
};
|
|
40
41
|
autoID?: boolean;
|
|
42
|
+
dim?: TypeParam;
|
|
43
|
+
max_length?: TypeParam;
|
|
41
44
|
}
|
|
42
45
|
export declare enum ShowCollectionsType {
|
|
43
46
|
All = 0,
|
|
@@ -111,7 +114,7 @@ export interface BoolResponse {
|
|
|
111
114
|
}
|
|
112
115
|
export interface CompactionResponse {
|
|
113
116
|
status: ResStatus;
|
|
114
|
-
compactionID:
|
|
117
|
+
compactionID: string;
|
|
115
118
|
}
|
|
116
119
|
export interface CollectionSchema {
|
|
117
120
|
name: string;
|
|
@@ -131,16 +134,16 @@ export interface GetCompactionPlansResponse {
|
|
|
131
134
|
status: ResStatus;
|
|
132
135
|
state: CompactionState;
|
|
133
136
|
mergeInfos: {
|
|
134
|
-
sources:
|
|
135
|
-
target:
|
|
137
|
+
sources: string[];
|
|
138
|
+
target: string;
|
|
136
139
|
}[];
|
|
137
140
|
}
|
|
138
141
|
export interface GetCompactionStateResponse {
|
|
139
142
|
status: ResStatus;
|
|
140
143
|
state: CompactionState;
|
|
141
|
-
executingPlanNo:
|
|
142
|
-
timeoutPlanNo:
|
|
143
|
-
completedPlanNo:
|
|
144
|
+
executingPlanNo: string;
|
|
145
|
+
timeoutPlanNo: string;
|
|
146
|
+
completedPlanNo: string;
|
|
144
147
|
}
|
|
145
148
|
export interface ShowCollectionsResponse extends TimeStampArray {
|
|
146
149
|
status: ResStatus;
|
|
@@ -157,4 +160,18 @@ export interface ReplicasResponse {
|
|
|
157
160
|
status: ResStatus;
|
|
158
161
|
replicas: ReplicaInfo[];
|
|
159
162
|
}
|
|
163
|
+
export interface GetLoadingProgressReq extends GrpcTimeOut {
|
|
164
|
+
collection_name: string;
|
|
165
|
+
partition_names?: string[];
|
|
166
|
+
}
|
|
167
|
+
export interface GetLoadingProgressResponse {
|
|
168
|
+
status: ResStatus;
|
|
169
|
+
progress: string;
|
|
170
|
+
}
|
|
171
|
+
export interface GetLoadStateReq extends GetLoadingProgressReq {
|
|
172
|
+
}
|
|
173
|
+
export interface GetLoadStateResponse {
|
|
174
|
+
status: ResStatus;
|
|
175
|
+
state: LoadState;
|
|
176
|
+
}
|
|
160
177
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/types/Collection.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../milvus/types/Collection.ts"],"names":[],"mappings":";;;AA8DA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,2DAAG,CAAA;IACH,iEAAM,CAAA;AACR,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"}
|
|
@@ -569,13 +569,21 @@ message MessageOptions {
|
|
|
569
569
|
message FieldOptions {
|
|
570
570
|
// The ctype option instructs the C++ code generator to use a different
|
|
571
571
|
// representation of the field than it normally would. See the specific
|
|
572
|
-
// options below. This option is
|
|
573
|
-
//
|
|
572
|
+
// options below. This option is only implemented to support use of
|
|
573
|
+
// [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
|
|
574
|
+
// type "bytes" in the open source release -- sorry, we'll try to include
|
|
575
|
+
// other types in a future version!
|
|
574
576
|
optional CType ctype = 1 [default = STRING];
|
|
575
577
|
enum CType {
|
|
576
578
|
// Default mode.
|
|
577
579
|
STRING = 0;
|
|
578
580
|
|
|
581
|
+
// The option [ctype=CORD] may be applied to a non-repeated field of type
|
|
582
|
+
// "bytes". It indicates that in C++, the data should be stored in a Cord
|
|
583
|
+
// instead of a string. For very large strings, this may reduce memory
|
|
584
|
+
// fragmentation. It may also allow better performance when parsing from a
|
|
585
|
+
// Cord, or when parsing with aliasing enabled, as the parsed Cord may then
|
|
586
|
+
// alias the original buffer.
|
|
579
587
|
CORD = 1;
|
|
580
588
|
|
|
581
589
|
STRING_PIECE = 2;
|
|
@@ -57,6 +57,7 @@ message FieldSchema {
|
|
|
57
57
|
FieldState state = 9; // To keep compatible with older version, the default
|
|
58
58
|
// state is `Created`.
|
|
59
59
|
DataType element_type = 10; // For array type, the element type is stored here
|
|
60
|
+
ScalarField default_value = 11; // default_value only support scalars for now
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
/**
|
|
@@ -84,7 +85,10 @@ message BytesArray { repeated bytes data = 1; }
|
|
|
84
85
|
|
|
85
86
|
message StringArray { repeated string data = 1; }
|
|
86
87
|
|
|
87
|
-
message ArrayArray {
|
|
88
|
+
message ArrayArray {
|
|
89
|
+
repeated ScalarField data = 1;
|
|
90
|
+
DataType element_type = 2;
|
|
91
|
+
}
|
|
88
92
|
|
|
89
93
|
message JSONArray { repeated bytes data = 1; }
|
|
90
94
|
|
package/dist/sdk.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.2.
|
|
1
|
+
{"version":"2.2.6","milvusVersion":"v2.2.5"}
|
package/dist/utils/Format.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyValuePair } from '../milvus
|
|
1
|
+
import { KeyValuePair, FieldType } from '../milvus';
|
|
2
2
|
/**
|
|
3
3
|
* parse [{key:"row_count",value:4}] to {row_count:4}
|
|
4
4
|
* @param data key value pair array
|
|
@@ -93,5 +93,24 @@ export declare const unixtimeToHybridts: (unixtime: bigint | string) => string;
|
|
|
93
93
|
* ```
|
|
94
94
|
*/
|
|
95
95
|
export declare const datetimeToHybrids: (datetime: Date) => string;
|
|
96
|
+
/**
|
|
97
|
+
* Converts a string to base64 encoding.
|
|
98
|
+
* @param str The string to convert.
|
|
99
|
+
* @returns The base64 encoded string.
|
|
100
|
+
*/
|
|
96
101
|
export declare const stringToBase64: (str: string) => string;
|
|
102
|
+
/**
|
|
103
|
+
* Formats the given address by removing the http or https prefix and appending the default Milvus port if necessary.
|
|
104
|
+
* @param address The address to format.
|
|
105
|
+
* @returns The formatted address.
|
|
106
|
+
*/
|
|
97
107
|
export declare const formatAddress: (address: string) => string;
|
|
108
|
+
/**
|
|
109
|
+
* Assigns properties with keys `dim` or `max_length` to the `type_params` object of a `FieldType` object.
|
|
110
|
+
* If the property exists in the `field` object, it is converted to a string and then deleted from the `field` object.
|
|
111
|
+
* If the property already exists in the `type_params` object, it is also converted to a string.
|
|
112
|
+
*
|
|
113
|
+
* @param field The `FieldType` object to modify.
|
|
114
|
+
* @returns The modified `FieldType` object.
|
|
115
|
+
*/
|
|
116
|
+
export declare const assignTypeParams: (field: FieldType, typeParamKeys?: string[]) => any;
|
package/dist/utils/Format.js
CHANGED
|
@@ -9,10 +9,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.formatAddress = exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.checkTimeParam = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
12
|
+
exports.assignTypeParams = exports.formatAddress = exports.stringToBase64 = exports.datetimeToHybrids = exports.unixtimeToHybridts = exports.hybridtsToUnixtime = exports.checkTimeParam = exports.formatNumberPrecision = exports.parseToKeyValue = exports.formatKeyValueData = void 0;
|
|
13
13
|
var _1 = require("./");
|
|
14
|
-
var
|
|
15
|
-
var ErrorReason_1 = require("../milvus/const/ErrorReason");
|
|
14
|
+
var milvus_1 = require("../milvus");
|
|
16
15
|
/**
|
|
17
16
|
* parse [{key:"row_count",value:4}] to {row_count:4}
|
|
18
17
|
* @param data key value pair array
|
|
@@ -95,7 +94,7 @@ exports.checkTimeParam = checkTimeParam;
|
|
|
95
94
|
*/
|
|
96
95
|
var hybridtsToUnixtime = function (hybridts) {
|
|
97
96
|
if (!(0, exports.checkTimeParam)(hybridts)) {
|
|
98
|
-
throw new Error("hybridts ".concat(
|
|
97
|
+
throw new Error("hybridts ".concat(milvus_1.ERROR_REASONS.TIMESTAMP_PARAM_CHECK));
|
|
99
98
|
}
|
|
100
99
|
var timestamp = typeof hybridts === 'bigint' ? hybridts : BigInt(hybridts);
|
|
101
100
|
var physical = timestamp >> LOGICAL_BITS;
|
|
@@ -126,7 +125,7 @@ exports.hybridtsToUnixtime = hybridtsToUnixtime;
|
|
|
126
125
|
*/
|
|
127
126
|
var unixtimeToHybridts = function (unixtime) {
|
|
128
127
|
if (!(0, exports.checkTimeParam)(unixtime)) {
|
|
129
|
-
throw new Error("hybridts ".concat(
|
|
128
|
+
throw new Error("hybridts ".concat(milvus_1.ERROR_REASONS.TIMESTAMP_PARAM_CHECK));
|
|
130
129
|
}
|
|
131
130
|
var timestamp = typeof unixtime === 'bigint' ? unixtime : BigInt(unixtime);
|
|
132
131
|
var physical = (timestamp * BigInt(1000)) << LOGICAL_BITS;
|
|
@@ -157,19 +156,56 @@ exports.unixtimeToHybridts = unixtimeToHybridts;
|
|
|
157
156
|
*/
|
|
158
157
|
var datetimeToHybrids = function (datetime) {
|
|
159
158
|
if (!(datetime instanceof Date)) {
|
|
160
|
-
throw new Error("hybridts ".concat(
|
|
159
|
+
throw new Error("hybridts ".concat(milvus_1.ERROR_REASONS.DATE_TYPE_CHECK));
|
|
161
160
|
}
|
|
162
161
|
return (0, exports.unixtimeToHybridts)((datetime.getTime() / 1000).toString());
|
|
163
162
|
};
|
|
164
163
|
exports.datetimeToHybrids = datetimeToHybrids;
|
|
164
|
+
/**
|
|
165
|
+
* Converts a string to base64 encoding.
|
|
166
|
+
* @param str The string to convert.
|
|
167
|
+
* @returns The base64 encoded string.
|
|
168
|
+
*/
|
|
165
169
|
var stringToBase64 = function (str) {
|
|
166
170
|
return Buffer.from(str, 'utf-8').toString('base64');
|
|
167
171
|
};
|
|
168
172
|
exports.stringToBase64 = stringToBase64;
|
|
173
|
+
/**
|
|
174
|
+
* Formats the given address by removing the http or https prefix and appending the default Milvus port if necessary.
|
|
175
|
+
* @param address The address to format.
|
|
176
|
+
* @returns The formatted address.
|
|
177
|
+
*/
|
|
169
178
|
var formatAddress = function (address) {
|
|
170
179
|
// remove http or https prefix from address
|
|
171
180
|
var ip = address.replace(/(http|https)*:\/\//, '');
|
|
172
|
-
return ip.includes(':') ? ip : "".concat(ip, ":").concat(
|
|
181
|
+
return ip.includes(':') ? ip : "".concat(ip, ":").concat(milvus_1.DEFAULT_MILVUS_PORT);
|
|
173
182
|
};
|
|
174
183
|
exports.formatAddress = formatAddress;
|
|
184
|
+
/**
|
|
185
|
+
* Assigns properties with keys `dim` or `max_length` to the `type_params` object of a `FieldType` object.
|
|
186
|
+
* If the property exists in the `field` object, it is converted to a string and then deleted from the `field` object.
|
|
187
|
+
* If the property already exists in the `type_params` object, it is also converted to a string.
|
|
188
|
+
*
|
|
189
|
+
* @param field The `FieldType` object to modify.
|
|
190
|
+
* @returns The modified `FieldType` object.
|
|
191
|
+
*/
|
|
192
|
+
var assignTypeParams = function (field, typeParamKeys) {
|
|
193
|
+
if (typeParamKeys === void 0) { typeParamKeys = ['dim', 'max_length']; }
|
|
194
|
+
var newField = JSON.parse(JSON.stringify(field));
|
|
195
|
+
typeParamKeys.forEach(function (key) {
|
|
196
|
+
if (newField.hasOwnProperty(key)) {
|
|
197
|
+
// if the property exists in the field object, assign it to the type_params object
|
|
198
|
+
newField.type_params = newField.type_params || {};
|
|
199
|
+
newField.type_params[key] = String(newField[key]);
|
|
200
|
+
// delete the property from the field object
|
|
201
|
+
delete newField[key];
|
|
202
|
+
}
|
|
203
|
+
if (newField.type_params && newField.type_params[key]) {
|
|
204
|
+
// if the property already exists in the type_params object, convert it to a string
|
|
205
|
+
newField.type_params[key] = String(newField.type_params[key]);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
return newField;
|
|
209
|
+
};
|
|
210
|
+
exports.assignTypeParams = assignTypeParams;
|
|
175
211
|
//# sourceMappingURL=Format.js.map
|
package/dist/utils/Format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../utils/Format.ts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aAA+C;IAA/C,8BAAA,EAAA,iBAA2B,KAAK,EAAE,YAAY,CAAC;IAE/C,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,aAAa,CAAC,OAAO,CAAC,UAAA,GAAG;QACvB,IAAI,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAChC,kFAAkF;YAClF,QAAQ,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,IAAI,EAAE,CAAC;YAClD,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YAClD,4CAA4C;YAC5C,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;SACtB;QAED,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;YACrD,mFAAmF;YACnF,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;SAC/D;IACH,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
|
package/dist/utils/test.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataType } from '../milvus/const/Milvus';
|
|
2
2
|
export declare const VECTOR_FIELD_NAME = "vector_field";
|
|
3
3
|
export declare const INDEX_NAME = "index_name";
|
|
4
|
-
export declare const genCollectionParams: (collectionName: string, dim: string, vectorType?: DataType.FloatVector | DataType.BinaryVector, autoID?: boolean, fields?: any[]) => {
|
|
4
|
+
export declare const genCollectionParams: (collectionName: string, dim: string | number, vectorType?: DataType.FloatVector | DataType.BinaryVector, autoID?: boolean, fields?: any[]) => {
|
|
5
5
|
collection_name: string;
|
|
6
6
|
fields: any[];
|
|
7
7
|
};
|
package/dist/utils/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../utils/test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAkD;AAErC,QAAA,iBAAiB,GAAG,cAAc,CAAC;AACnC,QAAA,UAAU,GAAG,YAAY,CAAC;AAChC,IAAM,mBAAmB,GAAG,UACjC,cAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../utils/test.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAkD;AAErC,QAAA,iBAAiB,GAAG,cAAc,CAAC;AACnC,QAAA,UAAU,GAAG,YAAY,CAAC;AAChC,IAAM,mBAAmB,GAAG,UACjC,cAAsB,EACtB,GAAoB,EACpB,UAEgD,EAChD,MAAsB,EACtB,MAAc;IAJd,2BAAA,EAAA,aAE4B,iBAAQ,CAAC,WAAW;IAChD,uBAAA,EAAA,aAAsB;IAGtB,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;IACtB,OAAO;QACL,eAAe,EAAE,cAAc;QAC/B,MAAM;YACJ;gBACE,IAAI,EAAE,yBAAiB;gBACvB,WAAW,EAAE,cAAc;gBAC3B,SAAS,EAAE,UAAU;gBAErB,WAAW,EAAE;oBACX,GAAG,KAAA;iBACJ;aACF;YACD;gBACE,IAAI,EAAE,KAAK;gBACX,SAAS,EAAE,iBAAQ,CAAC,KAAK;gBACzB,MAAM,QAAA;gBACN,cAAc,EAAE,IAAI;gBACpB,WAAW,EAAE,EAAE;aAChB;WACE,MAAM,OACV;KACF,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,mBAAmB,uBAgC9B;AAEK,IAAM,aAAa,GAAG,UAAC,GAAkB;IAAlB,oBAAA,EAAA,kBAAkB;IAC9C,OAAA,UAAG,GAAG,cAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE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