From 3bacef93132666de3cd520746284c42c4ac755de Mon Sep 17 00:00:00 2001 From: TsengSR Date: Fri, 6 Mar 2026 21:33:33 +0100 Subject: [PATCH 1/4] Fixes Qdrant 1.17 issue with returning empty vectors --- dotnet/src/VectorData/Qdrant/QdrantMapper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet/src/VectorData/Qdrant/QdrantMapper.cs b/dotnet/src/VectorData/Qdrant/QdrantMapper.cs index 38305113b40e..0f70f5417293 100644 --- a/dotnet/src/VectorData/Qdrant/QdrantMapper.cs +++ b/dotnet/src/VectorData/Qdrant/QdrantMapper.cs @@ -134,9 +134,9 @@ static void PopulateVectorProperty(TRecord record, VectorOutput value, VectorPro 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(value.Dense.Data.ToArray()), + var t when t == typeof(Embedding) => new Embedding(value.Dense.Data.ToArray()), + var t when t == typeof(float[]) => value.Dense.Data.ToArray(), _ => throw new UnreachableException() }); From 478632c30a41f0e476a67eccf31626da4f850ed3 Mon Sep 17 00:00:00 2001 From: TsengSR Date: Mon, 9 Mar 2026 21:04:38 +0100 Subject: [PATCH 2/4] Handle qdrant server < 1.17.0 too Updated Testcontainers.Qdrant to be able to use the string constructor to set a qdrant image version --- dotnet/Directory.Packages.props | 4 ++-- dotnet/global.json | 1 - dotnet/src/VectorData/Qdrant/QdrantMapper.cs | 15 ++++++++++++--- .../Support/QdrantTestStore.cs | 2 +- .../Support/TestContainer/WeaviateBuilder.cs | 4 ++-- 5 files changed, 17 insertions(+), 9 deletions(-) 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/global.json b/dotnet/global.json index 21f1386b7c54..973aac7805fb 100644 --- a/dotnet/global.json +++ b/dotnet/global.json @@ -1,6 +1,5 @@ { "sdk": { - "version": "10.0.100", "rollForward": "major", "allowPrerelease": false } diff --git a/dotnet/src/VectorData/Qdrant/QdrantMapper.cs b/dotnet/src/VectorData/Qdrant/QdrantMapper.cs index 0f70f5417293..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.Dense.Data.ToArray()), - var t when t == typeof(Embedding) => new Embedding(value.Dense.Data.ToArray()), - var t when t == typeof(float[]) => value.Dense.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/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) From f175bf4cc3ecebe44f28a6792a6692089359193f Mon Sep 17 00:00:00 2001 From: TsengSR Date: Mon, 9 Mar 2026 21:56:24 +0100 Subject: [PATCH 3/4] Accidentally commited this after local testing --- dotnet/global.json | 1 + 1 file changed, 1 insertion(+) diff --git a/dotnet/global.json b/dotnet/global.json index 973aac7805fb..21f1386b7c54 100644 --- a/dotnet/global.json +++ b/dotnet/global.json @@ -1,5 +1,6 @@ { "sdk": { + "version": "10.0.100", "rollForward": "major", "allowPrerelease": false } From 2ff51fcf16a5bef158a137202aee50803cc85e3c Mon Sep 17 00:00:00 2001 From: TsengSR Date: Tue, 10 Mar 2026 11:02:58 +0100 Subject: [PATCH 4/4] Parameterless ContainerBuilderconstructor is deprecated since Testcontainers 4.6.0 --- .../Pinecone.ConformanceTests/Support/PineconeTestStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)