-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Thanks for stopping by to let us know something could be better!
Is your feature request related to a problem? Please describe.
Cloud Spanner has introduced Vector Search capabilities; which EF 9.0 now has native support for with the IsVector extension methods.
Describe the solution you'd like
Be able to define a column as a Vector type using EF and the DDL created for Cloud Spanner marks up the ARRAY type as a Vector index.
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Blog>()
.Property(b => b.Embeddings)
.IsVector(DistanceFunction.Cosine, dimensions: 1536);
}When using the Where predicate, if the operator is a Vector Search, the translated SQL statements generated are vector searches:
var blogs = await context.Blogs
.OrderBy(s => EF.Functions.VectorDistance(s.Vector, vector))
.Take(5)
.ToListAsync();Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.