Skip to content

SQL Server: Implement support for VECTOR_SEARCH() #36384

Closed

Description

@roji

#36383 is adding support for the new SQL Server vector data type, as well as the translation of VECTOR_DISTANCE(), which performs precise, slow (non-index-driven) similarity search. In contrast, [VECTOR_SEARCH())(https://learn.microsoft.com/en-us/sql/t-sql/functions/vector-search-transact-sql?view=sql-server-ver17) allows approximate, index-driven search.

VECTOR_SEARCH() seems to be in a more experimental stage at this point, and its design as a special TVF (as opposed to VECTOR_DISTANCE() which is just a regular scalar function) both makes translation more difficult to implement, and may make it difficult to allow users to use pre-filtering. So I've split this off from the main issue for now.

Activity

  1. added this to the 10.0.0 milestone on Jul 17, 2025
  2. self-assigned this
    on Jul 17, 2025
  3. added theissue type on Jul 17, 2025
  4. roji commented on Aug 15, 2025

    @roji
    MemberAuthor

    Note: the main challenge with EF support for VECTOR_SEARCH() as a TVF is that the .NET function would need to return some .NET type that wraps the original table contents and the score. However, EF's query pipeline does not currently support arbitrary CLR types that aren't mapped; anonymous types are well-supported, but the EF.Functions.VectorSearch() stub cannot return an anonymous type.

  5. modified the milestones: 10.0.0, 11.0.0 on Sep 24, 2025
  6. removed their assignment
    on Oct 24, 2025
  7. modified the milestones: 11.0.0, Backlog on Dec 2, 2025
  8. roji commented on Dec 2, 2025

    @roji
    MemberAuthor

    Design discussion: we're going ahead with a provider-agnostic, unified vector search API (#36350), which would be implemented via VECTOR_DISTANCE() and VECTOR_SEARCH() on SQL Server (based on whether an index is defined or not).

    Given this, we won't be also introducing a SQL Server-specific API specifically for VECTOR_DISTANCE() - SQL Server users will be able to just use the general API instead. One main reason for this is that exposing VECTOR_DISTANCE() as a TVF requires some non-trivial architectural changes within EF (#36775), so we'll defer that until we have a strong reason to do it.

  9. 20 remaining items

  10. changed the title [-]Implement support for SQL Server VECTOR_SEARCH()[/-] [+]SQL Server: Implement support for VECTOR_SEARCH()[/+] on Feb 23, 2026
  11. reopened this on Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions