Struct swiftide_query::Pipeline
source · pub struct Pipeline<'stream, S: SearchStrategy = SimilaritySingleEmbedding, T = Pending> { /* private fields */ }
Expand description
The starting point of a query pipeline
Implementations§
source§impl<'a, S: SearchStrategy> Pipeline<'a, S>
impl<'a, S: SearchStrategy> Pipeline<'a, S>
sourcepub fn from_search_strategy(strategy: S) -> Pipeline<'a, S>
pub fn from_search_strategy(strategy: S) -> Pipeline<'a, S>
source§impl<'stream: 'static, S> Pipeline<'stream, S, Pending>where
S: SearchStrategy,
impl<'stream: 'static, S> Pipeline<'stream, S, Pending>where
S: SearchStrategy,
sourcepub fn evaluate_with<T: ToOwned<Owned = impl EvaluateQuery + 'stream>>(
self,
evaluator: T,
) -> Self
pub fn evaluate_with<T: ToOwned<Owned = impl EvaluateQuery + 'stream>>( self, evaluator: T, ) -> Self
Evaluate queries with an evaluator
sourcepub fn then_transform_query<T: ToOwned<Owned = impl TransformQuery + 'stream>>(
self,
transformer: T,
) -> Pipeline<'stream, S, Pending>
pub fn then_transform_query<T: ToOwned<Owned = impl TransformQuery + 'stream>>( self, transformer: T, ) -> Pipeline<'stream, S, Pending>
Transform a query into something else, see crate::query_transformers
source§impl<'stream: 'static, S: SearchStrategy + 'stream> Pipeline<'stream, S, Pending>
impl<'stream: 'static, S: SearchStrategy + 'stream> Pipeline<'stream, S, Pending>
source§impl<'stream: 'static, S: SearchStrategy> Pipeline<'stream, S, Retrieved>
impl<'stream: 'static, S: SearchStrategy> Pipeline<'stream, S, Retrieved>
sourcepub fn then_transform_response<T: ToOwned<Owned = impl TransformResponse + 'stream>>(
self,
transformer: T,
) -> Pipeline<'stream, S, Retrieved>
pub fn then_transform_response<T: ToOwned<Owned = impl TransformResponse + 'stream>>( self, transformer: T, ) -> Pipeline<'stream, S, Retrieved>
Transforms a retrieved query into something else
source§impl<'stream: 'static, S: SearchStrategy> Pipeline<'stream, S, Retrieved>
impl<'stream: 'static, S: SearchStrategy> Pipeline<'stream, S, Retrieved>
Trait Implementations§
source§impl Default for Pipeline<'_, SimilaritySingleEmbedding>
impl Default for Pipeline<'_, SimilaritySingleEmbedding>
By default the SearchStrategy
is SimilaritySingleEmbedding
, which embed the current
query and returns a collection of documents.
Auto Trait Implementations§
impl<'stream, S, T> Freeze for Pipeline<'stream, S, T>where
S: Freeze,
impl<'stream, S = SimilaritySingleEmbedding, T = Pending> !RefUnwindSafe for Pipeline<'stream, S, T>
impl<'stream, S, T> Send for Pipeline<'stream, S, T>where
T: Send,
impl<'stream, S = SimilaritySingleEmbedding, T = Pending> !Sync for Pipeline<'stream, S, T>
impl<'stream, S, T> Unpin for Pipeline<'stream, S, T>where
S: Unpin,
impl<'stream, S = SimilaritySingleEmbedding, T = Pending> !UnwindSafe for Pipeline<'stream, S, T>
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