Skip to main content

Crate entelix_memory_qdrant

Crate entelix_memory_qdrant 

Source
Expand description

§entelix-memory-qdrant

Concrete entelix_memory::VectorStore implementation backed by the qdrant 1.5+ gRPC API.

Companion to the trait-only entelix_memory crate: vendor-SDK dependencies (qdrant-client plus its tonic / prost transitive tree) live here so users who plug their own VectorStore pay nothing in compile time.

§One-call setup

use entelix_memory_qdrant::{DistanceMetric, QdrantVectorStore};

let store = QdrantVectorStore::builder("memories", 1536)
    .with_url("http://localhost:6334")
    .with_distance(DistanceMetric::Cosine)
    .build()
    .await?;

§Multi-tenancy

Single-collection design (qdrant official multi-tenancy guidance): every read / write / count / list rides a must anchor on the rendered entelix_memory::Namespace. Two tenants sharing the same operator-facing doc_id are stored as distinct points without coordination — the qdrant PointId is a deterministic UUID v5 of (namespace_key, doc_id). The original doc_id survives in the payload for round-trip.

§Schema-as-code escape hatch

Operators that provision the qdrant collection externally (helm chart, Terraform, qdrant Cloud console) call QdrantVectorStoreBuilder::with_existing_collection — the builder skips both collection creation and payload-index provisioning and trusts the operator to have stamped them.

Structs§

QdrantVectorStore
Concrete VectorStore backed by a single qdrant collection.
QdrantVectorStoreBuilder
Builder for QdrantVectorStore.

Enums§

DistanceMetric
Distance metric used for vector similarity. Mirrors qdrant’s own taxonomy 1:1 — operators familiar with qdrant pick the metric they would have picked there.
QdrantStoreError
Errors that can surface from QdrantVectorStore.

Constants§

CONTENT_KEY
Payload key carrying the document’s content text.
DOC_ID_KEY
Payload key carrying the operator-supplied doc_id. Distinct from qdrant’s internal PointId so filters / scrolls can surface the operator id without a server-side reverse mapping.
METADATA_KEY
Payload key carrying the document’s metadata (flat map). User metadata fields ride here as nested JSON; filter expressions targeting metadata reference them via metadata.<key> paths.
NAMESPACE_KEY
Payload key under which the rendered Namespace is stamped on every point. Indexed at collection-create time so the must-clause that always rides on every search/count/list query is a single index probe rather than a full scan.

Type Aliases§

QdrantStoreResult
Result alias used inside entelix-memory-qdrant.