Skip to content

Commit

Permalink
Allow IEnumerable<float> for search vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Oct 22, 2024
1 parent 916ab50 commit b2305f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public async Task<VectorSearchResults<TRecord>> VectorizedSearchAsync<TVector>(T
var floatVector = vector switch
{
ICollection<float> v => v,
IReadOnlyCollection<float> v => [.. v],
IEnumerable<float> v => [.. v],
ReadOnlyMemory<float> v => v.ToArray(),
_ => throw new NotSupportedException($"The provided vector type {vector.GetType().FullName} is not supported by the Elasticsearch connector.")
};
Expand Down

0 comments on commit b2305f0

Please sign in to comment.