diff --git a/Milvus.Client/FieldSchema.cs b/Milvus.Client/FieldSchema.cs index 4efd6d2..0c9720b 100644 --- a/Milvus.Client/FieldSchema.cs +++ b/Milvus.Client/FieldSchema.cs @@ -76,7 +76,7 @@ public static FieldSchema CreateVarchar( /// The field name. /// The dimension of the vector. Must be greater than zero. /// An optional description for the field. - public static FieldSchema CreateFloatVector(string name, long dimension, string description = "") + public static FieldSchema CreateFloatVector(string name, int dimension, string description = "") => new(name, MilvusDataType.FloatVector, description: description) { Dimension = dimension }; /// @@ -85,7 +85,7 @@ public static FieldSchema CreateFloatVector(string name, long dimension, string /// The field name. /// The dimension of the vector. Must be greater than zero. /// An optional description for the field. - public static FieldSchema CreateBinaryVector(string name, long dimension, string description = "") + public static FieldSchema CreateBinaryVector(string name, int dimension, string description = "") => new(name, MilvusDataType.BinaryVector, description: description) { Dimension = dimension }; /// @@ -191,7 +191,7 @@ internal FieldSchema( /// The dimension of the vector. Mandatory for /// and fields, and must be greater than zero. /// - public long? Dimension { get; set; } + public int? Dimension { get; set; } /// /// The state of the field. diff --git a/Milvus.Client/MilvusCollection.Collection.cs b/Milvus.Client/MilvusCollection.Collection.cs index 2ca2a12..057aba7 100644 --- a/Milvus.Client/MilvusCollection.Collection.cs +++ b/Milvus.Client/MilvusCollection.Collection.cs @@ -46,7 +46,7 @@ await _client.InvokeAsync(_client.GrpcClient.DescribeCollectionAsync, request, r break; case Constants.VectorDim: - milvusField.Dimension = long.Parse(parameter.Value, CultureInfo.InvariantCulture); + milvusField.Dimension = int.Parse(parameter.Value, CultureInfo.InvariantCulture); break; } }