Skip to content

Commit aa313ae

Browse files
rojiCopilot
andauthored
Update entity-framework/core/providers/sql-server/vector-search.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b1c837b commit aa313ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

entity-framework/core/providers/sql-server/vector-search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ SQL Server's `VECTOR_SEARCH()` table-valued function retrieves rows based on vec
9696
Use the `VectorSearch()` extension method on your `DbSet`, and chain `OrderBy()`, `Take()`, and `WithApproximate()` to perform an approximate nearest neighbor (ANN) search that uses a [vector index](/sql/t-sql/statements/create-vector-index-transact-sql):
9797

9898
```csharp
99-
var blogs = await context.Blogs
99+
var results = await context.Blogs
100100
.VectorSearch(b => b.Embedding, embedding, "cosine")
101101
.OrderBy(r => r.Distance)
102102
.Take(5)
103103
.WithApproximate()
104104
.ToListAsync();
105105

106-
foreach (var result in blogs)
106+
foreach (var result in results)
107107
{
108108
Console.WriteLine($"Blog {result.Value.Id} with distance {result.Distance}");
109109
}

0 commit comments

Comments
 (0)