pub struct AndRetriever { /* private fields */ }Expand description
.and(A, B) — concurrent fan-out, concatenated output (with per-source tag preserved).
Implementations§
Source§impl AndRetriever
impl AndRetriever
Source§impl AndRetriever
impl AndRetriever
pub fn new(left: Box<dyn Retriever>, right: Box<dyn Retriever>) -> AndRetriever
pub fn fuse_rrf(self, k: u32) -> FuseRrfRetriever
pub fn top(self, n: usize) -> TopRetriever
Sourcepub fn rerank(self, reranker: Arc<dyn Reranker>) -> RerankRetriever
pub fn rerank(self, reranker: Arc<dyn Reranker>) -> RerankRetriever
Wrap with a cross-encoder rerank pass (Plan 02-03).
Sourcepub fn degraded_fallback<R>(self, fallback: R) -> DegradedFallbackRetrieverwhere
R: Retriever + 'static,
pub fn degraded_fallback<R>(self, fallback: R) -> DegradedFallbackRetrieverwhere
R: Retriever + 'static,
Wrap with a fallback retriever — if THIS And path errors, switch to
fallback and tag returned hits with degraded: true (Plan 02-03).
Trait Implementations§
Source§impl Retriever for AndRetriever
impl Retriever for AndRetriever
Source§fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawHit>, LunarisError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
AndRetriever: 'async_trait,
fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 QueryContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<RawHit>, LunarisError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
AndRetriever: 'async_trait,
Run the operator against
ctx and return the unranked-or-ranked
raw hits this operator produces. The downstream stage (combinator
or fuse_rrf) decides what to do with them.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Cast this operator to
&dyn Any so the RRF routing dispatcher can
recover the concrete operator type. Concrete operators override with
fn as_any(&self) -> &dyn Any { self }. The default returns a sentinel
&() so unknown operators downcast as None (and the dispatcher falls
back to client-side RRF instead of misrouting).Auto Trait Implementations§
impl !RefUnwindSafe for AndRetriever
impl !UnwindSafe for AndRetriever
impl Freeze for AndRetriever
impl Send for AndRetriever
impl Sync for AndRetriever
impl Unpin for AndRetriever
impl UnsafeUnpin for AndRetriever
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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