Skip to main content

RerankerError

Enum RerankerError 

Source
pub enum RerankerError {
Show 20 variants EmbedderUnavailable { model: String, reason: String, }, EmbeddingFailed { model: String, source: Box<dyn Error + Sync + Send>, }, ModelNotFound { name: String, }, ModelLoadFailed { path: PathBuf, source: Box<dyn Error + Sync + Send>, }, 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 + Sync + Send>, }, 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 + Sync + Send>, }, 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§

§

EmbedderUnavailable

An embedding model is not available (not compiled in, or model files missing).

Fields

§model: String

Identifier of the unavailable model.

§reason: String

Why it is unavailable.

§

EmbeddingFailed

Embedding inference failed for a given model.

Fields

§model: String

Which model failed.

§source: Box<dyn Error + Sync + Send>

The underlying error.

§

ModelNotFound

Model files were not found at any searched path.

Fields

§name: String

Model identifier.

§

ModelLoadFailed

Model files exist but failed to load (corrupted, incompatible version, etc.).

Fields

§path: PathBuf

Path that was attempted.

§source: Box<dyn Error + Sync + Send>

The underlying error.

§

IndexCorrupted

The vector index file is corrupted (bad magic, CRC mismatch, truncated).

Fields

§path: PathBuf

Path to the corrupted file.

§detail: String

Nature of the corruption.

§

IndexVersionMismatch

The FSVI file version does not match what this build expects.

Fields

§expected: u16

The version this library expects.

§found: u16

The version found in the file.

§

DimensionMismatch

Query vector dimension does not match the index dimension.

Fields

§expected: usize

Dimension the index was built with.

§found: usize

Dimension of the query vector.

§

IndexNotFound

No vector index file exists at the expected path.

Fields

§path: PathBuf

Expected path.

§

QueryParseError

The query string could not be parsed.

Fields

§query: String

The problematic query.

§detail: String

What went wrong.

§

SearchTimeout

A search phase exceeded its time budget.

Fields

§elapsed_ms: u64

How long the operation ran.

§budget_ms: u64

The configured budget.

§

FederatedInsufficientResponses

Federated search did not receive enough successful shard responses.

Fields

§required: usize

Minimum responses required by config.

§received: usize

Number of successful shard responses observed.

§

RerankerUnavailable

The reranking model is not available.

Fields

§model: String

Model identifier.

§

RerankFailed

Reranking inference failed.

Fields

§model: String

Which reranker model failed.

§source: Box<dyn Error + Sync + Send>

The underlying error.

§

Io(Error)

Wraps std::io::Error for file operations.

§

InvalidConfig

A configuration value is invalid.

Fields

§field: String

Which config field.

§value: String

The invalid value.

§reason: String

Why it is invalid.

§

HashMismatch

Downloaded or loaded file does not match expected hash.

Fields

§path: PathBuf

Path to the file.

§expected: String

Expected hash (hex string).

§actual: String

Actual computed hash.

§

Cancelled

Operation was cancelled via the asupersync structured concurrency protocol.

Fields

§phase: String

Which phase was active when cancelled.

§reason: String

Cancellation reason.

§

QueueFull

The embedding job queue is full.

Fields

§pending: usize

Number of pending items.

§capacity: usize

Queue capacity.

§

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

§subsystem: &'static str

Which subsystem produced the error (e.g., “storage”, “durability”, “fts5”).

§source: Box<dyn Error + Sync + Send>

The underlying error.

§

DurabilityDisabled

A durability/repair feature was requested but is not compiled in.

Trait Implementations§

Source§

impl Debug for SearchError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for SearchError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for SearchError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for SearchError

Source§

fn from(source: Error) -> SearchError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, _span: NoopSpan) -> Self

Instruments this future with a span (no-op when disabled).
Source§

fn in_current_span(self) -> Self

Instruments this future with the current span (no-op when disabled).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Fruit for T
where T: Send + Downcast,