Cosmos: Disable full-text and vector indexes on complex collection wildcard paths in tests#38578
Open
AndriySvyryd with Copilot wants to merge 4 commits into
Open
Cosmos: Disable full-text and vector indexes on complex collection wildcard paths in tests#38578AndriySvyryd with Copilot wants to merge 4 commits into
AndriySvyryd with Copilot wants to merge 4 commits into
Conversation
…d paths from tests Full-text and vector indexes on complex collection type properties translate to paths with [] wildcard expressions (e.g., /ComplexNestedCollection/[]/NestedSingles) which are not supported by Azure Cosmos DB. - Comment out vector index config on ComplexNestedCollection in VectorSearchFixture - Comment out the Vector_index_through_complex_collection_roundtrips test - Comment out full-text index config on ComplexNestedCollection in FullTextSearchFixture - Add b.Ignore() for ComplexNestedCollection in both fixtures Both sets of commented-out code reference issue #35898 for future tracking. Closes #38557 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing test on real cosmos db for collection wildcard paths
Cosmos: Disable full-text and vector indexes on complex collection wildcard paths in tests
Jul 8, 2026
AndriySvyryd
reviewed
Jul 8, 2026
…comments - Uncomment Vector_index_through_complex_collection_roundtrips method body; keep only [ConditionalFact] attribute commented - Include emulator check in the commented-out fixture code for VectorSearchFixture - Comment out [Fact] attribute and Full_text_index_through_complex_collection_roundtrips method in FullTextSearchTranslationsCosmosTest Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
AndriySvyryd
reviewed
Jul 8, 2026
…d body Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates Cosmos functional tests to avoid creating full-text and vector indexing policies on complex collection wildcard paths (e.g. /ComplexNestedCollection/[]/...), which Azure Cosmos DB currently rejects with BadRequest (400) when running against a real instance (tracked by issue #35898).
Changes:
- Disables the vector index configuration on
ComplexNestedCollectioninVectorSearchTranslationsCosmosTestand ignores that property in the model. - Disables the full-text index configuration on
ComplexNestedCollectioninFullTextSearchTranslationsCosmosTestand ignores that property in the model.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/EFCore.Cosmos.FunctionalTests/Query/Translations/VectorSearchTranslationsCosmosTest.cs | Stops configuring vector indexing on a complex collection wildcard path; ignores ComplexNestedCollection to avoid container creation failure. |
| test/EFCore.Cosmos.FunctionalTests/Query/Translations/FullTextSearchTranslationsCosmosTest.cs | Stops configuring full-text indexing on a complex collection wildcard path; ignores ComplexNestedCollection to avoid container creation failure. |
Comment on lines
+235
to
237
| // issue #35898: vector indexes on collection wildcard paths are not supported | ||
| //[ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotEmulator))] | ||
| public virtual async Task Vector_index_through_complex_collection_roundtrips() |
Comment on lines
+488
to
490
| // issue #35898: full-text indexes on collection wildcard paths are not supported | ||
| //[Fact] | ||
| public virtual async Task Full_text_index_through_complex_collection_roundtrips() |
This file contains hidden or 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
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.
Azure Cosmos DB does not support full-text or vector indexing policies with
[]wildcard path segments (e.g.,/ComplexNestedCollection/[]/NestedSingles), causingBadRequest (400)on container creation when running against a real Cosmos DB instance.Changes
VectorSearchTranslationsCosmosTest: Comment outIsVectorProperty+IsVectorIndexconfiguration onComplexNestedCollection; replace the emulator-conditional block with an unconditionalb.Ignore(x => x.ComplexNestedCollection). Comment outVector_index_through_complex_collection_roundtripstest which depended on that index.FullTextSearchTranslationsCosmosTest: Comment outEnableFullTextSearch+IsFullTextIndexconfiguration onComplexNestedCollection; addb.Ignore(x => x.ComplexNestedCollection).Both sites reference issue #35898 (proper support for wildcard-path indexes) for future re-enablement.