-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Cleanup around vector in Cosmos #35960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maumar
wants to merge
1
commit into
main
Choose a base branch
from
cosmos_vector_cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+298
−196
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR cleans up Cosmos vector and full-text search APIs by removing experimental flags and renaming vector-related API methods.
- Renames vector index configuration methods from ForVectors to IsVectorIndex and similarly updates full-text index test names.
- Removes #pragma warning disable/restore blocks related to experimental features and shifts some validation logic into container creation.
Reviewed Changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/EFCore.Cosmos.Tests/Infrastructure/CosmosModelValidatorTest.cs | Updates test methods to use IsFullTextIndex/IsVectorIndex and removes unnecessary pragma disables. |
test/EFCore.Cosmos.FunctionalTests/VectorSearchCosmosTest.cs | Renames vector index configuration calls and removes pragma warnings. |
test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs | Removes pragma disables for experimental warnings during container creation. |
test/EFCore.Cosmos.FunctionalTests/HybridSearchCosmosTest.cs | Updates hybrid search tests to use new vector and full-text index method names. |
test/EFCore.Cosmos.FunctionalTests/AddHocVectorSearchCosmosTest.cs | Introduces ad hoc tests for composite vector index and vector property on collection navigation. |
test/EFCore.Cosmos.FunctionalTests/AddHocFullTextSearchCosmosTest.cs | Adjusts error messages for full text index validations and removes obsolete tests. |
src/Shared/EFDiagnostics.cs | Adds a new diagnostic constant for CosmosFullTextSearchExperimental. |
src/EFCore.Cosmos/Storage/Internal/CosmosVectorTypeMapping.cs | Removes the Experimental attribute from the CosmosVectorTypeMapping class. |
src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs | Refactors composite vector index validation and updates error messages. |
src/EFCore.Cosmos/Metadata/Internal/CosmosVectorType.cs | Removes the Experimental attribute from the CosmosVectorType record. |
src/EFCore.Cosmos/Metadata/Internal/CosmosAnnotationNames.cs | Removes the Experimental attribute from vector related annotations. |
src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs | Adjusts vector and full text index validation logic and comment descriptions. |
src/EFCore.Cosmos/Extensions/* | Replaces Experimental attributes and renames vector index methods accordingly across property and index extension methods. |
src/EFCore.Cosmos/Extensions/CosmosDbFunctionsExtensions.cs | Removes Experimental attributes on vector distance functions. |
Files not reviewed (3)
- src/EFCore.Cosmos/EFCore.Cosmos.csproj: Language not supported
- src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs: Language not supported
- src/EFCore.Cosmos/Properties/CosmosStrings.resx: Language not supported
maumar
commented
Apr 16, 2025
03c3d87
to
65759e1
Compare
roji
requested changes
Apr 17, 2025
src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs
Outdated
Show resolved
Hide resolved
e75f2b1
to
8cc7136
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
8cc7136
to
be92392
Compare
new version up @roji |
- remove experimental from vector APIs, - renamed vector index model builder method from ForVector to IsVectorIndex, - renamed vector property model builder method from IsVector to IsVectorProperty, - use helper methods rather than extracting annotations directly in validation, - move some validation to container creation, so that queries are not blocked when Cosmos starts supporting new things (e.g. composite indexes) - split CosmosVectorType into two annotations (distance function and dimensions) so that we can keep CVT pubternal Fixes #35895 Fixes #35886 Fixes #35897 Fixes #35903 Fixes #35965
be92392
to
ecba8a8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #35895
Fixes #35886
Fixes #35897
Fixes #35903
Fixes #35965