Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<PackageVersion Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" />

<!-- Azure SDK for .NET dependencies -->
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.44.1" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.45.0" />

<!-- SQL Server dependencies -->
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
Expand Down
36 changes: 0 additions & 36 deletions src/EFCore.Cosmos/Extensions/DistanceFunction.cs

This file was deleted.

19 changes: 0 additions & 19 deletions src/EFCore.Cosmos/Extensions/Embedding.cs

This file was deleted.

40 changes: 0 additions & 40 deletions src/EFCore.Cosmos/Extensions/VectorDataType.cs

This file was deleted.

14 changes: 0 additions & 14 deletions src/EFCore.Cosmos/Extensions/VectorIndexPath.cs

This file was deleted.

35 changes: 0 additions & 35 deletions src/EFCore.Cosmos/Extensions/VectorIndexType.cs

This file was deleted.

6 changes: 0 additions & 6 deletions src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/EFCore.Cosmos/Properties/CosmosStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,6 @@
<data name="NoSubqueryPushdown" xml:space="preserve">
<value>Azure Cosmos DB does not have an appropriate subquery for this translation.</value>
</data>
<data name="NoVectorContainerConfig" xml:space="preserve">
<value>Container configuration for embeddings is not yet supported by the Cosmos SDK. Instead, configure the container manually. See https://aka.ms/ef-cosmos-vectors for more information.</value>
</data>
<data name="NullTypeMappingInSqlTree" xml:space="preserve">
<value>The expression '{sqlExpression}' in the SQL tree does not have a type mapping assigned.</value>
</data>
Expand Down
7 changes: 2 additions & 5 deletions src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,14 @@ private static async Task<bool> CreateContainerIfNotExistsOnceAsync(
AnalyticalStoreTimeToLiveInSeconds = parameters.AnalyticalStoreTimeToLiveInSeconds,
};

// TODO: Enable these once they are available in the Cosmos SDK. See #33783.
if (embeddings.Any())
{
throw new InvalidOperationException(CosmosStrings.NoVectorContainerConfig);
//containerProperties.VectorEmbeddingPolicy = new VectorEmbeddingPolicy(embeddings);
containerProperties.VectorEmbeddingPolicy = new VectorEmbeddingPolicy(embeddings);
}

if (vectorIndexes.Any())
{
throw new InvalidOperationException(CosmosStrings.NoVectorContainerConfig);
//containerProperties.IndexingPolicy = new IndexingPolicy { VectorIndexes = vectorIndexes };
containerProperties.IndexingPolicy = new IndexingPolicy { VectorIndexes = vectorIndexes };
}

var response = await wrapper.Client.GetDatabase(wrapper._databaseId).CreateContainerIfNotExistsAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ namespace Microsoft.EntityFrameworkCore;

#pragma warning disable EF9103

// These tests are skipped for now because we cannot create a compatible test container until the SDK supports it.
internal class VectorSearchCosmosTest : IClassFixture<VectorSearchCosmosTest.VectorSearchFixture>
public class VectorSearchCosmosTest : IClassFixture<VectorSearchCosmosTest.VectorSearchFixture>
{
public VectorSearchCosmosTest(VectorSearchFixture fixture, ITestOutputHelper testOutputHelper)
{
Expand Down