Skip to main content

Crate revector

Crate revector 

Source
Expand description

§revector

Declarative, versioned schema & config migrations for Qdrant — think “Alembic for vector collections”.

revector manages the automatable, in-place surface of a Qdrant deployment: collections, payload indexes, named-vector add/drop, aliases, and all tunable configs. Migrations are plain YAML files discovered from a migrations/ directory, chained Alembic-style via revision / down_revision, and applied/rolled back through a CLI. Applied state is tracked inside Qdrant itself, so no external database is required.

The one thing a binary can’t own — re-embedding points with the user’s model — is handled by an exec-hook escape hatch.

§Module map

  • config — layered configuration loading.
  • spec — declarative schema/config vocabulary authored in YAML.
  • ops — migration operations and their reversibility.
  • migration / chain — file parsing, discovery, and DAG resolution.
  • convert — spec → qdrant-client type translation.
  • executor — idempotent execution of operations.
  • tracking — applied-revision bookkeeping inside Qdrant.
  • runner — up/down/to/status orchestration with checksum safety.
  • diff — declaration-driven drift detection.

Re-exports§

pub use config::Config;
pub use error::Error;
pub use error::Result;

Modules§

chain
Resolve discovered migrations into an ordered revision chain.
cli
Command-line interface definition (clap derive).
client
Thin wrapper around qdrant_client::Qdrant that applies revector’s config.
config
Layered configuration loading.
convert
Translate declarative crate::spec types into qdrant-client proto/builder types.
diff
Drift detection: compare a declared CollectionSpec against the live collection returned by get_collection.
error
Error types for revector.
exec_hook
The re-embedding escape hatch: shell out to a user-provided command.
executor
Execute migration Operations against a live Qdrant.
migration
Migration files: parsing, discovery, and checksums.
ops
Migration operations — the verbs a migration can perform.
runner
Orchestration: apply (up), roll back (down), jump (to), and report (status) over a resolved revision Chain.
scaffold
Scaffolding for revector new and revector init.
spec
Declarative spec types — the on-disk vocabulary for describing Qdrant schema and config.
tracking
Applied-revision bookkeeping, stored inside Qdrant itself.