swiftide::traits

Trait Retrieve

Source
pub trait Retrieve<S>:
    Send
    + Sync
    + DynClone
where S: SearchStrategy,
{ // Required method fn retrieve<'life0, 'life1, 'async_trait>( &'life0 self, search_strategy: &'life1 S, query: Query<Pending>, ) -> Pin<Box<dyn Future<Output = Result<Query<Retrieved>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; // Provided method fn name(&self) -> &'static str { ... } }
Expand description

Can retrieve documents given a SearchStrategy

Required Methods§

Source

fn retrieve<'life0, 'life1, 'async_trait>( &'life0 self, search_strategy: &'life1 S, query: Query<Pending>, ) -> Pin<Box<dyn Future<Output = Result<Query<Retrieved>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn name(&self) -> &'static str

Trait Implementations§

Source§

impl<'clone, S> Clone for Box<dyn Retrieve<S> + 'clone>

Source§

fn clone(&self) -> Box<dyn Retrieve<S> + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone, S> Clone for Box<dyn Retrieve<S> + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn Retrieve<S> + Send + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone, S> Clone for Box<dyn Retrieve<S> + Send + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn Retrieve<S> + Send + Sync + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone, S> Clone for Box<dyn Retrieve<S> + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn Retrieve<S> + Sync + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S> Retrieve<S> for Box<dyn Retrieve<S>>
where S: SearchStrategy,

Source§

fn retrieve<'life0, 'life1, 'async_trait>( &'life0 self, search_strategy: &'life1 S, query: Query<Pending>, ) -> Pin<Box<dyn Future<Output = Result<Query<Retrieved>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn Retrieve<S>>: 'async_trait,

Source§

fn name(&self) -> &'static str

Implementations on Foreign Types§

Source§

impl<S> Retrieve<S> for Box<dyn Retrieve<S>>
where S: SearchStrategy,

Source§

fn retrieve<'life0, 'life1, 'async_trait>( &'life0 self, search_strategy: &'life1 S, query: Query<Pending>, ) -> Pin<Box<dyn Future<Output = Result<Query<Retrieved>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<dyn Retrieve<S>>: 'async_trait,

Source§

fn name(&self) -> &'static str

Source§

impl<S> Retrieve<S> for Arc<dyn Retrieve<S>>
where S: SearchStrategy,

Source§

fn retrieve<'life0, 'life1, 'async_trait>( &'life0 self, search_strategy: &'life1 S, query: Query<Pending>, ) -> Pin<Box<dyn Future<Output = Result<Query<Retrieved>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Arc<dyn Retrieve<S>>: 'async_trait,

Source§

fn name(&self) -> &'static str

Implementors§

Source§

impl Retrieve<CustomStrategy<QueryBuilder<'static, Postgres>>> for PgVector

Source§

impl Retrieve<HybridSearch> for Qdrant

Implement the Retrieve trait for HybridSearch search strategy.

Can be used in the query pipeline to retrieve documents from Qdrant.

Expects both a dense and sparse embedding to be set on the query.

Source§

impl Retrieve<SimilaritySingleEmbedding> for LanceDB

Source§

impl Retrieve<SimilaritySingleEmbedding> for PgVector

Source§

impl Retrieve<SimilaritySingleEmbedding> for Qdrant

Ensures that the SimilaritySingleEmbedding search strategy can be used when no filter is set.

Source§

impl Retrieve<SimilaritySingleEmbedding<String>> for LanceDB

Implement the Retrieve trait for SimilaritySingleEmbedding search strategy.

Can be used in the query pipeline to retrieve documents from LanceDB.

Supports filters as strings. Refer to the LanceDB documentation for the format.

Source§

impl Retrieve<SimilaritySingleEmbedding<String>> for PgVector

Source§

impl Retrieve<SimilaritySingleEmbedding<Filter>> for Qdrant

Implement the Retrieve trait for SimilaritySingleEmbedding search strategy.

Can be used in the query pipeline to retrieve documents from Qdrant.

Supports filters via the qdrant_client::qdrant::Filter type.

Source§

impl<Q> Retrieve<CustomStrategy<Q>> for LanceDB
where Q: ExecutableQuery + Send + Sync + 'static,

Source§

impl<S, F> Retrieve<S> for F