Describe the bug
The metricType parameter in the SearchAsync method of the Milvus connector is incorrect.
The current code hard-codes the milvus search metric type to SimilarityMetricType.Ip, which causes the issue where even if the Metric type is specified as SimilarityMetricType.Cosine when creating the MilvusMemoryStore, SimilarityMetricType.IP is still used during the search.
To Reproduce
The source code:
semantic-kernel/dotnet/src/Connectors/Connectors.Memory.Milvus
/MilvusMemoryStore.cs#L449
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Platform
Describe the bug
The
metricTypeparameter in theSearchAsyncmethod of the Milvus connector is incorrect.The current code hard-codes the milvus search metric type to
SimilarityMetricType.Ip, which causes the issue where even if the Metric type is specified asSimilarityMetricType.Cosinewhen creating theMilvusMemoryStore,SimilarityMetricType.IPis still used during the search.To Reproduce
The source code:
semantic-kernel/dotnet/src/Connectors/Connectors.Memory.Milvus
/MilvusMemoryStore.cs#L449
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Platform
/MilvusMemoryStore.cs#L449