Store: Qdrant
Key Points
- Qdrant = open-source vector database. Rust-based; fast; production-ready.
- Self-host (Docker / k8s) or Qdrant Cloud (managed).
- Strong filter language; payload (metadata) richer than basic vector DBs.
- Less native hybrid than Azure AI Search; recent improvements.
- When: open-source preference, multi-cloud, Rust-driven perf needs.
Setup
// Qdrant client
var client = new QdrantClient("localhost", 6334); // gRPC port
var collection = new QdrantCollection<ulong, MyDoc>(client, "my-collection");
await collection.EnsureCollectionExistsAsync();
Record
public class MyDoc
{
[VectorStoreKey]
public ulong Id { get; set; }
[VectorStoreData]
public string Title { get; set; } = "";
[VectorStoreData]
public string Category { get; set; } = "";
[VectorStoreVector(Dimensions: 1536, DistanceFunction = DistanceFunction.CosineSimilarity)]
public ReadOnlyMemory<float>? Embedding { get; set; }
}
Search with filter
await foreach (var r in collection.SearchAsync(queryEmb, top: 10, new VectorSearchOptions<MyDoc>
{
Filter = d => d.Category == "Tech" && d.Title.Contains("dotnet")
}))
{ /* ... */ }
Qdrant filter language is rich: must, must_not, should, range, geo, nested.
Payload
Beyond the typed fields, Qdrant stores arbitrary JSON payload:
public class MyDoc
{
/* typed fields */
[VectorStoreData]
public Dictionary<string, object?>? Payload { get; set; } // arbitrary
}
HNSW index
Qdrant uses HNSW (Hierarchical Navigable Small World). Tunable m, ef_construct, ef.
new VectorStoreCollectionDefinition
{
/* ... */
Properties =
{
new VectorStoreVectorPropertyDefinition("Embedding", typeof(ReadOnlyMemory<float>))
{
Dimensions = 1536,
DistanceFunction = DistanceFunction.CosineSimilarity,
IndexKind = IndexKind.Hnsw
}
}
};
Most defaults fine; tune for huge datasets.
Quantization
Qdrant supports scalar, product, binary quantization → reduce memory; minor quality cost.
Hybrid (in 2026)
Qdrant added hybrid (dense + sparse) recently. Combine with BM25-like sparse vectors:
Less mature than Azure AI Search hybrid.
Collections / shards
For multi-tenant: multiple collections (one per tenant) OR single collection with tenantId filter. Filter approach scales better.
Self-host
# docker-compose.yml
services:
qdrant:
image: qdrant/qdrant:latest
ports: ["6333:6333", "6334:6334"]
volumes: ["./qdrant_storage:/qdrant/storage"]
Production: cluster mode for scale + HA.
Qdrant Cloud
Managed offering. Good for teams without ops capacity. Per-region pricing.
Auth
For self-hosted: TLS + API key.
.NET integration
Qdrant.Client SDK + Microsoft.Extensions.VectorData.Qdrant adapter.
Performance
Rust-based; very fast. Production benchmarks: - 10K QPS at sub-10ms p95 on modest hardware. - 100M+ vectors per cluster.
Use cases
- Open-source preference.
- Multi-cloud (Qdrant Cloud spans AWS, GCP, Azure).
- Heavy filter usage (rich filter language).
- Cost-sensitive at scale (self-host).
Senior considerations
- Persistence: configure proper volumes; snapshot strategy.
- Backup: snapshot API.
- Scaling: shards + replicas.
- Eval search quality: Qdrant tuning sometimes needed.