diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 33bb59c555e2..e8b306a3d9e7 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -182,12 +182,12 @@ - + - + diff --git a/dotnet/src/VectorData/Qdrant/QdrantMapper.cs b/dotnet/src/VectorData/Qdrant/QdrantMapper.cs index 38305113b40e..992b5fa05891 100644 --- a/dotnet/src/VectorData/Qdrant/QdrantMapper.cs +++ b/dotnet/src/VectorData/Qdrant/QdrantMapper.cs @@ -130,13 +130,22 @@ public TRecord MapFromStorageToDataModel(PointId pointId, MapField data = value switch + { + // qdrant 1.16 and newer, return the new union type + { Dense: not null } => value.Dense.Data, + // Required for qdrant < 1.16.0, but deprecated in client >=1.16.0 and is empty with qdrant server 1.17.0 + { Data: not null } => value.Data, + _ => throw new UnreachableException() + + }; property.SetValueAsObject( record, (Nullable.GetUnderlyingType(property.Type) ?? property.Type) switch { - var t when t == typeof(ReadOnlyMemory) => new ReadOnlyMemory(value.Data.ToArray()), - var t when t == typeof(Embedding) => new Embedding(value.Data.ToArray()), - var t when t == typeof(float[]) => value.Data.ToArray(), + var t when t == typeof(ReadOnlyMemory) => new ReadOnlyMemory(data.ToArray()), + var t when t == typeof(Embedding) => new Embedding(data.ToArray()), + var t when t == typeof(float[]) => data.ToArray(), _ => throw new UnreachableException() }); diff --git a/dotnet/test/VectorData/Pinecone.ConformanceTests/Support/PineconeTestStore.cs b/dotnet/test/VectorData/Pinecone.ConformanceTests/Support/PineconeTestStore.cs index fbe4bde93715..bcac6988e4d3 100644 --- a/dotnet/test/VectorData/Pinecone.ConformanceTests/Support/PineconeTestStore.cs +++ b/dotnet/test/VectorData/Pinecone.ConformanceTests/Support/PineconeTestStore.cs @@ -88,7 +88,7 @@ protected override async Task StopAsync() private async Task StartContainerAsync() { - ContainerBuilder builder = new ContainerBuilder() + ContainerBuilder builder = new ContainerBuilder("ghcr.io/pinecone-io/pinecone-local:latest") .WithImage(Image) // Pinecone Local will run on port $FirstPort. .WithPortBinding(FirstPort, assignRandomHostPort: true) diff --git a/dotnet/test/VectorData/Qdrant.ConformanceTests/Support/QdrantTestStore.cs b/dotnet/test/VectorData/Qdrant.ConformanceTests/Support/QdrantTestStore.cs index 1725ff1f94dc..83252d0f143d 100644 --- a/dotnet/test/VectorData/Qdrant.ConformanceTests/Support/QdrantTestStore.cs +++ b/dotnet/test/VectorData/Qdrant.ConformanceTests/Support/QdrantTestStore.cs @@ -18,7 +18,7 @@ internal sealed class QdrantTestStore : TestStore // Qdrant doesn't support the default Flat index kind public override string DefaultIndexKind => IndexKind.Hnsw; - private readonly QdrantContainer _container = new QdrantBuilder().Build(); + private readonly QdrantContainer _container = new QdrantBuilder("qdrant/qdrant:v1.17.0").Build(); private readonly bool _hasNamedVectors; private QdrantClient? _client; diff --git a/dotnet/test/VectorData/Weaviate.ConformanceTests/Support/TestContainer/WeaviateBuilder.cs b/dotnet/test/VectorData/Weaviate.ConformanceTests/Support/TestContainer/WeaviateBuilder.cs index 95d004167fe7..fbaab5f1a8d3 100644 --- a/dotnet/test/VectorData/Weaviate.ConformanceTests/Support/TestContainer/WeaviateBuilder.cs +++ b/dotnet/test/VectorData/Weaviate.ConformanceTests/Support/TestContainer/WeaviateBuilder.cs @@ -31,8 +31,8 @@ protected override WeaviateBuilder Init() .WithEnvironment("AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED", "true") .WithEnvironment("PERSISTENCE_DATA_PATH", "/var/lib/weaviate") .WithWaitStrategy(Wait.ForUnixContainer() - .UntilPortIsAvailable(WeaviateHttpPort) - .UntilPortIsAvailable(WeaviateGrpcPort) + .UntilInternalTcpPortIsAvailable(WeaviateHttpPort) + .UntilInternalTcpPortIsAvailable(WeaviateGrpcPort) .UntilHttpRequestIsSucceeded(r => r.ForPath("/v1/.well-known/ready").ForPort(WeaviateHttpPort))); protected override WeaviateBuilder Clone(IResourceConfiguration resourceConfiguration)