#[non_exhaustive]pub struct StandardRetriever {
pub filter: Option<OneOrMany<QueryContainer>>,
pub min_score: Option<f32>,
pub name: Option<String>,
pub query: Option<QueryContainer>,
pub search_after: Option<Vec<FieldValue>>,
pub terminate_after: Option<i32>,
pub sort: Option<OneOrMany<SortCombinations>>,
pub collapse: Option<FieldCollapse>,
}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.
query: Option<QueryContainer>Defines a query to retrieve a set of top documents.
search_after: Option<Vec<FieldValue>>Defines a search after object parameter used for pagination.
terminate_after: Option<i32>Maximum number of documents to collect for each shard.
sort: Option<OneOrMany<SortCombinations>>A sort object that that specifies the order of matching documents.
collapse: Option<FieldCollapse>Collapses the top documents by a specified key into a single top document per key.
Implementations§
Source§impl StandardRetriever
impl StandardRetriever
Sourcepub fn new() -> StandardRetriever
pub fn new() -> StandardRetriever
A StandardRetriever with its required properties set.
Source§impl StandardRetriever
impl StandardRetriever
Sourcepub fn filter(
self,
value: impl Into<OneOrMany<QueryContainer>>,
) -> StandardRetriever
pub fn filter( self, value: impl Into<OneOrMany<QueryContainer>>, ) -> StandardRetriever
Sets filter.
Sourcepub fn min_score(self, value: f32) -> StandardRetriever
pub fn min_score(self, value: f32) -> StandardRetriever
Sets min_score.
Sourcepub fn name(self, value: impl Into<String>) -> StandardRetriever
pub fn name(self, value: impl Into<String>) -> StandardRetriever
Sets name.
Sourcepub fn query(self, value: impl Into<QueryContainer>) -> StandardRetriever
pub fn query(self, value: impl Into<QueryContainer>) -> StandardRetriever
Sets query.
Sourcepub fn search_after(
self,
value: impl Into<Vec<FieldValue>>,
) -> StandardRetriever
pub fn search_after( self, value: impl Into<Vec<FieldValue>>, ) -> StandardRetriever
Sets search_after.
Sourcepub fn terminate_after(self, value: i32) -> StandardRetriever
pub fn terminate_after(self, value: i32) -> StandardRetriever
Sets terminate_after.
Sourcepub fn sort(
self,
value: impl Into<OneOrMany<SortCombinations>>,
) -> StandardRetriever
pub fn sort( self, value: impl Into<OneOrMany<SortCombinations>>, ) -> StandardRetriever
Sets sort.
Sourcepub fn collapse(self, value: impl Into<FieldCollapse>) -> StandardRetriever
pub fn collapse(self, value: impl Into<FieldCollapse>) -> StandardRetriever
Sets collapse.
Trait Implementations§
Source§impl Clone for StandardRetriever
impl Clone for StandardRetriever
Source§fn clone(&self) -> StandardRetriever
fn clone(&self) -> StandardRetriever
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 StandardRetriever
impl Debug for StandardRetriever
Source§impl<'de> Deserialize<'de> for StandardRetriever
impl<'de> Deserialize<'de> for StandardRetriever
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StandardRetriever, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StandardRetriever, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<StandardRetriever> for RetrieverContainer
impl From<StandardRetriever> for RetrieverContainer
Source§fn from(value: StandardRetriever) -> RetrieverContainer
fn from(value: StandardRetriever) -> RetrieverContainer
Converts to this type from the input type.
Source§impl PartialEq for StandardRetriever
impl PartialEq for StandardRetriever
Source§impl Serialize for StandardRetriever
impl Serialize for StandardRetriever
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 StandardRetriever
Auto Trait Implementations§
impl Freeze for StandardRetriever
impl RefUnwindSafe for StandardRetriever
impl Send for StandardRetriever
impl Sync for StandardRetriever
impl Unpin for StandardRetriever
impl UnsafeUnpin for StandardRetriever
impl UnwindSafe for StandardRetriever
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