pub enum SearchError {
Show 20 variants
EmbedderUnavailable {
model: String,
reason: String,
},
EmbeddingFailed {
model: String,
source: Box<dyn Error + Send + Sync>,
},
ModelNotFound {
name: String,
},
ModelLoadFailed {
path: PathBuf,
source: Box<dyn Error + Send + Sync>,
},
IndexCorrupted {
path: PathBuf,
detail: String,
},
IndexVersionMismatch {
expected: u16,
found: u16,
},
DimensionMismatch {
expected: usize,
found: usize,
},
IndexNotFound {
path: PathBuf,
},
QueryParseError {
query: String,
detail: String,
},
SearchTimeout {
elapsed_ms: u64,
budget_ms: u64,
},
FederatedInsufficientResponses {
required: usize,
received: usize,
},
RerankerUnavailable {
model: String,
},
RerankFailed {
model: String,
source: Box<dyn Error + Send + Sync>,
},
Io(Error),
InvalidConfig {
field: String,
value: String,
reason: String,
},
HashMismatch {
path: PathBuf,
expected: String,
actual: String,
},
Cancelled {
phase: String,
reason: String,
},
QueueFull {
pending: usize,
capacity: usize,
},
SubsystemError {
subsystem: &'static str,
source: Box<dyn Error + Send + Sync>,
},
DurabilityDisabled,
}Expand description
Unified error type covering all failure modes across the frankensearch search pipeline.
Every variant includes an actionable error message guiding the consumer toward resolution.
The TwoTierSearcher catches transient errors and degrades gracefully: fast embedding
failures can still yield lexical-only initial results when lexical retrieval is available,
RerankFailed skips reranking, and SearchTimeout yields initial results.
Only IndexNotFound and InvalidConfig prevent search from starting.
Variants§
An embedding model is not available (not compiled in, or model files missing).
EmbeddingFailed
Embedding inference failed for a given model.
ModelNotFound
Model files were not found at any searched path.
ModelLoadFailed
Model files exist but failed to load (corrupted, incompatible version, etc.).
Fields
IndexCorrupted
The vector index file is corrupted (bad magic, CRC mismatch, truncated).
IndexVersionMismatch
The FSVI file version does not match what this build expects.
DimensionMismatch
Query vector dimension does not match the index dimension.
Fields
IndexNotFound
No vector index file exists at the expected path.
QueryParseError
The query string could not be parsed.
SearchTimeout
A search phase exceeded its time budget.
FederatedInsufficientResponses
Federated search did not receive enough successful shard responses.
Fields
The reranking model is not available.
RerankFailed
Reranking inference failed.
Fields
Io(Error)
Wraps std::io::Error for file operations.
InvalidConfig
A configuration value is invalid.
Fields
HashMismatch
Downloaded or loaded file does not match expected hash.
Fields
Cancelled
Operation was cancelled via the asupersync structured concurrency protocol.
QueueFull
The embedding job queue is full.
SubsystemError
Wraps errors from optional subsystems (storage, durability, FTS5, etc.).
Always present in the enum regardless of feature flags, avoiding match-arm breakage across feature combinations.
Fields
DurabilityDisabled
A durability/repair feature was requested but is not compiled in.
Trait Implementations§
Source§impl Debug for SearchError
impl Debug for SearchError
Source§impl Display for SearchError
impl Display for SearchError
Source§impl Error for SearchError
impl Error for SearchError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()