#[non_exhaustive]pub struct LinearRetriever {
pub filter: Option<OneOrMany<QueryContainer>>,
pub min_score: Option<f32>,
pub name: Option<String>,
pub retrievers: Option<Vec<InnerRetriever>>,
pub rank_window_size: Option<i32>,
pub query: Option<String>,
pub fields: Option<Vec<String>>,
pub normalizer: Option<ScoreNormalizer>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.filter: Option<OneOrMany<QueryContainer>>Query to filter the documents that can match.
min_score: Option<f32>Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
name: Option<String>Retriever name.
retrievers: Option<Vec<InnerRetriever>>Inner retrievers.
rank_window_size: Option<i32>§query: Option<String>§fields: Option<Vec<String>>§normalizer: Option<ScoreNormalizer>Implementations§
Source§impl LinearRetriever
impl LinearRetriever
Sourcepub fn new() -> LinearRetriever
pub fn new() -> LinearRetriever
A LinearRetriever with its required properties set.
Source§impl LinearRetriever
impl LinearRetriever
Sourcepub fn filter(
self,
value: impl Into<OneOrMany<QueryContainer>>,
) -> LinearRetriever
pub fn filter( self, value: impl Into<OneOrMany<QueryContainer>>, ) -> LinearRetriever
Sets filter.
Sourcepub fn min_score(self, value: f32) -> LinearRetriever
pub fn min_score(self, value: f32) -> LinearRetriever
Sets min_score.
Sourcepub fn name(self, value: impl Into<String>) -> LinearRetriever
pub fn name(self, value: impl Into<String>) -> LinearRetriever
Sets name.
Sourcepub fn retrievers(
self,
value: impl Into<Vec<InnerRetriever>>,
) -> LinearRetriever
pub fn retrievers( self, value: impl Into<Vec<InnerRetriever>>, ) -> LinearRetriever
Sets retrievers.
Sourcepub fn rank_window_size(self, value: i32) -> LinearRetriever
pub fn rank_window_size(self, value: i32) -> LinearRetriever
Sets rank_window_size.
Sourcepub fn query(self, value: impl Into<String>) -> LinearRetriever
pub fn query(self, value: impl Into<String>) -> LinearRetriever
Sets query.
Sourcepub fn normalizer(self, value: impl Into<ScoreNormalizer>) -> LinearRetriever
pub fn normalizer(self, value: impl Into<ScoreNormalizer>) -> LinearRetriever
Sets normalizer.
Trait Implementations§
Source§impl Clone for LinearRetriever
impl Clone for LinearRetriever
Source§fn clone(&self) -> LinearRetriever
fn clone(&self) -> LinearRetriever
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearRetriever
impl Debug for LinearRetriever
Source§impl<'de> Deserialize<'de> for LinearRetriever
impl<'de> Deserialize<'de> for LinearRetriever
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LinearRetriever, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LinearRetriever, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LinearRetriever> for RetrieverContainer
impl From<LinearRetriever> for RetrieverContainer
Source§fn from(value: LinearRetriever) -> RetrieverContainer
fn from(value: LinearRetriever) -> RetrieverContainer
Converts to this type from the input type.
Source§impl PartialEq for LinearRetriever
impl PartialEq for LinearRetriever
Source§impl Serialize for LinearRetriever
impl Serialize for LinearRetriever
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LinearRetriever
Auto Trait Implementations§
impl Freeze for LinearRetriever
impl RefUnwindSafe for LinearRetriever
impl Send for LinearRetriever
impl Sync for LinearRetriever
impl Unpin for LinearRetriever
impl UnsafeUnpin for LinearRetriever
impl UnwindSafe for LinearRetriever
Blanket Implementations§
impl<T> Allocation for T
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