UNPKG

@zilliz/milvus2-sdk-node

Version:

Official Node.js SDK for [Milvus](https://github.com/milvus-io/milvus) vector database. Provides gRPC and HTTP clients for vector similarity search, metadata filtering, and full collection/index/user management.

71 lines • 5.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ErrorCode = exports.ERROR_REASONS = void 0; const _1 = require("./"); exports.ERROR_REASONS = { MILVUS_ADDRESS_IS_REQUIRED: 'The `address` property is missing.', CREATE_COLLECTION_MISS_DATA_TYPE: 'The `data_type` property is missing in the `field` object.', CREATE_COLLECTION_CHECK_PARAMS: 'The `fields` or `collection_name` property is missing.', CREATE_COLLECTION_CHECK_PRIMARY_KEY: 'The `data_type` for the primary key field must be DataType.Int64.', CREATE_COLLECTION_CHECK_VECTOR_FIELD_EXIST: 'The `data_type` of a vector field must be either DataType.FloatVector or DataType.BinaryVector.', CREATE_COLLECTION_CHECK_MISS_DIM: 'The `dim` property is missing.', CREATE_COLLECTION_CHECK_MISS_MAX_LENGTH: 'The `max_length` property is missing', CREATE_COLLECTION_CHECK_BINARY_DIM: 'The `dim` property of the Binary vector should be value multiples of 8.', CREATE_EXTERNAL_COLLECTION_AUTO_ID: 'External collections do not support auto_id.', CREATE_EXTERNAL_COLLECTION_PRIMARY_KEY: 'External collections do not support primary key.', COLLECTION_NAME_IS_REQUIRED: 'The `collection_name` property is missing.', COLLECTION_ID_IS_REQUIRED: 'The `collectionID` property is missing.', COLLECTION_PARTITION_NAME_ARE_REQUIRED: 'The `collection_name` or the `partition_name` property is missing.', INSERT_CHECK_FIELD_DATA_IS_REQUIRED: 'The type of the `data or field_data` should be an array and length > 0.', INSERT_CHECK_WRONG_FIELD: 'Insert fail: some field does not exist for this collection in line.', INSERT_CHECK_WRONG_DIM: 'Insert fail: the length of the binary vector should be (dimension / 8).', INSERT_CHECK_WRONG_DATA_TYPE: 'The value of the `data_type` property is not supported:', GET_METRIC_CHECK_PARAMS: 'The `metric_type` property is missing.', GET_FLUSH_STATE_CHECK_PARAMS: 'At least one of `segmentIDs`, `collection_name`, or `flush_ts` is required.', GET_FLUSH_ALL_STATE_CHECK_PARAMS: 'At least one of `flush_all_ts` or `flush_all_tss` is required.', LOAD_BALANCE_CHECK_PARAMS: 'The `src_nodeID` property is missing.', PARTITION_NAMES_IS_REQUIRED: 'The `partition_names` property is missing.', ALIAS_NAME_IS_REQUIRED: 'The `alias` property is missing.', COMPACTION_ID_IS_REQUIRED: 'The `compactionID` property is missing.', USERNAME_PWD_ARE_REQUIRED: 'The `username` or `password` property is missing.', USERNAME_IS_REQUIRED: 'The `username` property is missing.', FILTER_EXPR_REQUIRED: 'The `filter` or the `expr` property is missing.', TIMESTAMP_PARAM_CHECK: 'The type of the `hybridts` property should be string (only contains number) or bigint.', DATE_TYPE_CHECK: 'The type of the `datetime` property should be Date.', IMPORT_FILE_CHECK: 'The `files` property is missing.', SEARCH_PARAMS_IS_NOT_MATCH: 'Some of the search parameters are not match.', VECTORS_OR_VECTOR_IS_MISSING: 'The `vector` or `vectors` property is missing.', FIELD_TYPE_IS_NOT_SUPPORT: `The data_type is not supported, please use one of ${Object.keys(_1.DataTypeMap) .filter((d) => d !== 'None' && d !== 'String') .join(', ')}.`, INVALID_PARTITION_NUM: `The partition numbers should between 1 and ${_1.MAX_PARTITIONS_NUMBER}`, INVALID_PARTITION_KEY_FIELD_TYPE: 'Only non-primary key Int64 or VarChar field support partition key.', PARTITION_KEY_FIELD_MAXED_OUT: `Only ${_1.MAX_PARTITION_KEY_FIELD_COUNT} field supports partition key. `, IDS_REQUIRED: 'The `ids` is missing or empty.', NO_ANNS_FEILD_FOUND_IN_SEARCH: 'Target anns field not found, please check your search parameters.', FUNCTION_SCHEMA_IS_REQUIRED: 'The `function` property is missing.', FUNCTION_NAME_IS_REQUIRED: 'The `function_name` property is missing.', FUNCTION_FIELD_SCHEMA_IS_REQUIRED: 'The `field` property is missing.', ADD_FUNCTION_FIELD_TYPE_NOT_SUPPORTED: 'The `function.type` property only supports FunctionType.BM25 and FunctionType.MINHASH.', ADD_FUNCTION_FIELD_OUTPUT_TYPE_NOT_SUPPORTED: 'FunctionType.BM25 requires DataType.SparseFloatVector and FunctionType.MINHASH requires DataType.BinaryVector.', ADD_FUNCTION_FIELD_INDEX_TYPE_IS_REQUIRED: 'An explicit `index_type` is required for the bound index.', ADD_FUNCTION_FIELD_AUTOINDEX_NOT_SUPPORTED: 'The bound index does not support IndexType.AUTOINDEX.', ADD_FUNCTION_FIELD_DUPLICATED_INDEX_PARAM: 'Duplicated bound index parameters are not allowed.', ADD_COLLECTION_FIELD_VECTOR_NULLABLE_REQUIRED: 'Adding a vector field to an existing collection requires nullable=true.', ADD_COLLECTION_STRUCT_FIELD_NULLABLE_REQUIRED: 'Adding a struct array field to an existing collection requires nullable=true.', DROP_COLLECTION_FIELD_IDENTIFIER_IS_REQUIRED: 'Specify exactly one valid `field_name` or `field_id`.', ALTER_COLLECTION_SCHEMA_STATUS_IS_REQUIRED: 'The AlterCollectionSchema response is missing `alter_status`.', }; var ErrorCode; (function (ErrorCode) { ErrorCode["SUCCESS"] = "Success"; ErrorCode["IndexNotExist"] = "IndexNotExist"; ErrorCode["UnexpectedError"] = "UnexpectedError"; ErrorCode["EmptyCollection"] = "EmptyCollection"; ErrorCode["UpsertAutoIDTrue"] = "UpsertAutoIDTrue"; ErrorCode["CollectionNotExists"] = "CollectionNotExists"; ErrorCode["IllegalArgument"] = "IllegalArgument"; ErrorCode["RateLimit"] = "RateLimit"; ErrorCode["SchemaMismatch"] = "SchemaMismatch"; })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); //# sourceMappingURL=error.js.map