Skip to content

Document WithApproximate LINQ operator for SQL Server vector search#5346

Open
roji wants to merge 1 commit intodotnet:preview.5from
roji:roji/vector-search-docs-update
Open

Document WithApproximate LINQ operator for SQL Server vector search#5346
roji wants to merge 1 commit intodotnet:preview.5from
roji:roji/vector-search-docs-update

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Apr 25, 2026

The VectorSearch() API in EF Core has been updated (dotnet/efcore#38144) to replace the topN parameter with a composable LINQ pattern using Take() and a new WithApproximate() operator. This PR updates the documentation to reflect the new API surface.

Key changes:

  • SQL Server vector search page: Restructured the "Approximate search with VECTOR_SEARCH()" section into "Searching with VECTOR_SEARCH()" to reflect that the TVF now supports both exact kNN and approximate ANN search. Added a dedicated WithApproximate() subsection explaining its usage and constraints. Updated all code samples and generated SQL to show the new OrderBy().Take().WithApproximate() pattern (replacing the old topN parameter). Updated the hybrid search example and its SQL accordingly.
  • What's new page: Updated the VECTOR_SEARCH() section to show the new API with Take() and WithApproximate(), and explain the difference between exact and approximate search modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants