Skip to main content

Crate qql_edge

Crate qql_edge 

Source
Expand description

Combines fastembed-rs for local ONNX embedding inference with qdrant-edge for in-process HNSW vector search. No network hops, no external services, no API keys — unless you choose an external provider.

§Embedder options

FunctionEmbedderNetwork?
local_executorfastembed (ONNX, local CPU)❌ none
local_executor_with_optionsfastembed + model/cache selection❌ none
[http_executor]OpenAI-compatible HTTP endpoint✅ provider only
custom_executorAny Arc<dyn Embedder>up to you

§Quick start

use qql_edge::local_executor;
use qql::executor::OnError;

let mut executor = local_executor("/tmp/qql-edge-data", false)?;
let resp = executor.execute("CREATE COLLECTION docs HYBRID", OnError::Stop).await?;

§JSON scope (“envelope removal”)

Responses are fully typed (ExecData, no JSON envelope). serde_json::Value remains only where the engine API requires it: point payloads (PointStruct::new), typed-spec introspection maps, the turbo quantization builder map, and formula DEFAULTS (edge formulas are JSON). Value-based parity helpers are test-only (#[cfg(test)]).

Structs§

EdgeQdrant
In-process backend: one qdrant_edge shard per collection under base_path, zero network. Batch methods fan out to individual routes (no native batch RPC).
EmbeddingModelInfo
Public description of a local ONNX embedding model.
FastEmbedder
Local fastembed embedder: dense ONNX model plus optional sparse, multi (ColBERT), image, and cross-encoder slots, with wire-compatible BM25 fallback.
FastEmbedderOptions
Options for constructing a FastEmbedder.
LocalExecutorOptions
Options for local_executor_with_options.
ShardSummary
Counts collected from a snapshot-seeded shard.

Functions§

custom_executor
Build an edge Executor with a fully custom Embedder.
custom_executor_with_dimension
Build an edge Executor with a custom embedder and an optional explicit dense dimension. The embedder-reported dimension takes precedence.
custom_executor_with_storage
Like custom_executor_with_dimension, with an explicit WAL segment capacity (bytes) applied to every shard the executor opens or creates; None keeps the engine default.
inspect_shard
Load the shard at shard_dir, read its counts, and close it again.
list_embedding_models
List dense text models, offline sparse models (SPLADE / BGE-M3), multi (BGE-M3 / ColBERT), and image models (CLIP vision, …) that fastembed can load.
local_executor
Build a fully-local Executor backed by fastembed-rs and qdrant-edge.
local_executor_with_options
Build a fully-local Executor with explicit model / cache options.
resolve_embedding_model
Resolve a user-facing dense model string to an EmbeddingModel.
resolve_image_model
Resolve offline image model (CLIP vision, etc.).
resolve_multi_model
Resolve offline multi model (bge-m3, HF code, etc.).
unpack_snapshot
Unpack a downloaded shard-snapshot archive into target.
wal_segment_capacity_bytes
Convert a MiB WAL segment capacity into the byte count LocalExecutorOptions::wal_segment_capacity expects.