semantic-kernel
semantic-kernel copied to clipboard
.Net: Bug: The Milvus connector search metric type is incorrect
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
- OS: [Windows]
- IDE: [Visual Studio]
- Language: [C#]
- Source: semantic-kernel/dotnet/src/Connectors/Connectors.Memory.Milvus /MilvusMemoryStore.cs#L449