You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQL Server: Implement support for VECTOR_SEARCH() #36384
#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.
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.
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.
Activity
roji commentedon Aug 15, 2025
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.roji commentedon Dec 2, 2025
Design discussion: we're going ahead with a provider-agnostic, unified vector search API (#36350), which would be implemented via
VECTOR_DISTANCE()andVECTOR_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 exposingVECTOR_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.20 remaining items
[-]Implement support for SQL Server VECTOR_SEARCH()[/-][+]SQL Server: Implement support for VECTOR_SEARCH()[/+]Implement latest SQL Server approximate vector search feature
Implement latest SQL Server approximate vector search feature
Implement latest SQL Server approximate vector search feature
Implement latest SQL Server approximate vector search feature
Implement latest SQL Server approximate vector search feature
Implement latest SQL Server approximate vector search feature (#38075)