Skip to content
Open
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
4 changes: 2 additions & 2 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@
<PackageVersion Include="sqlite-vec" Version="0.1.7-alpha.2.1" />
<PackageVersion Include="NRedisStack" Version="1.0.0" />
<PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" />
<PackageVersion Include="Testcontainers" Version="4.6.0" />
<PackageVersion Include="Testcontainers" Version="4.10.0" />
<PackageVersion Include="Testcontainers.Milvus" Version="4.8.1" />
<PackageVersion Include="Testcontainers.MongoDB" Version="4.6.0" />
<PackageVersion Include="Testcontainers.MsSql" Version="4.6.0" />
<PackageVersion Include="Testcontainers.PostgreSql" Version="4.6.0" />
<PackageVersion Include="Testcontainers.Qdrant" Version="4.6.0" />
<PackageVersion Include="Testcontainers.Qdrant" Version="4.10.0" />
<PackageVersion Include="Testcontainers.Redis" Version="4.6.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.1.2" />
<PackageVersion Include="Qdrant.Client" Version="1.15.1" />
Expand Down
15 changes: 12 additions & 3 deletions dotnet/src/VectorData/Qdrant/QdrantMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,22 @@ public TRecord MapFromStorageToDataModel(PointId pointId, MapField<string, Value

static void PopulateVectorProperty(TRecord record, VectorOutput value, VectorPropertyModel property)
{
RepeatedField<float> 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<float>) => new ReadOnlyMemory<float>(value.Data.ToArray()),
var t when t == typeof(Embedding<float>) => new Embedding<float>(value.Data.ToArray()),
var t when t == typeof(float[]) => value.Data.ToArray(),
var t when t == typeof(ReadOnlyMemory<float>) => new ReadOnlyMemory<float>(data.ToArray()),
var t when t == typeof(Embedding<float>) => new Embedding<float>(data.ToArray()),
var t when t == typeof(float[]) => data.ToArray(),

_ => throw new UnreachableException()
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected override async Task StopAsync()

private async Task<IContainer> 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<CreateContainerParameters> resourceConfiguration)
Expand Down
Loading