#[non_exhaustive]pub struct RuleRetriever {
pub filter: Option<OneOrMany<QueryContainer>>,
pub min_score: Option<f32>,
pub name: Option<String>,
pub ruleset_ids: Option<OneOrMany<String>>,
pub match_criteria: Option<Value>,
pub retriever: Option<RetrieverContainer>,
pub rank_window_size: Option<i32>,
}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.
ruleset_ids: Option<OneOrMany<String>>The ruleset IDs containing the rules this retriever is evaluating against.
match_criteria: Option<Value>The match criteria that will determine if a rule in the provided rulesets should be applied.
retriever: Option<RetrieverContainer>The retriever whose results rules should be applied to.
rank_window_size: Option<i32>This value determines the size of the individual result set.
Implementations§
Source§impl RuleRetriever
impl RuleRetriever
Sourcepub fn new(
ruleset_ids: impl Into<OneOrMany<String>>,
match_criteria: impl Into<Value>,
retriever: impl Into<RetrieverContainer>,
) -> RuleRetriever
pub fn new( ruleset_ids: impl Into<OneOrMany<String>>, match_criteria: impl Into<Value>, retriever: impl Into<RetrieverContainer>, ) -> RuleRetriever
A RuleRetriever with its required properties set.
Source§impl RuleRetriever
impl RuleRetriever
Sourcepub fn filter(
self,
value: impl Into<OneOrMany<QueryContainer>>,
) -> RuleRetriever
pub fn filter( self, value: impl Into<OneOrMany<QueryContainer>>, ) -> RuleRetriever
Sets filter.
Sourcepub fn min_score(self, value: f32) -> RuleRetriever
pub fn min_score(self, value: f32) -> RuleRetriever
Sets min_score.
Sourcepub fn name(self, value: impl Into<String>) -> RuleRetriever
pub fn name(self, value: impl Into<String>) -> RuleRetriever
Sets name.
Sourcepub fn rank_window_size(self, value: i32) -> RuleRetriever
pub fn rank_window_size(self, value: i32) -> RuleRetriever
Sets rank_window_size.
Trait Implementations§
Source§impl Clone for RuleRetriever
impl Clone for RuleRetriever
Source§fn clone(&self) -> RuleRetriever
fn clone(&self) -> RuleRetriever
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 RuleRetriever
impl Debug for RuleRetriever
Source§impl<'de> Deserialize<'de> for RuleRetriever
impl<'de> Deserialize<'de> for RuleRetriever
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RuleRetriever, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RuleRetriever, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<RuleRetriever> for RetrieverContainer
impl From<RuleRetriever> for RetrieverContainer
Source§fn from(value: RuleRetriever) -> RetrieverContainer
fn from(value: RuleRetriever) -> RetrieverContainer
Converts to this type from the input type.
Source§impl PartialEq for RuleRetriever
impl PartialEq for RuleRetriever
Source§impl Serialize for RuleRetriever
impl Serialize for RuleRetriever
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 RuleRetriever
Auto Trait Implementations§
impl Freeze for RuleRetriever
impl RefUnwindSafe for RuleRetriever
impl Send for RuleRetriever
impl Sync for RuleRetriever
impl Unpin for RuleRetriever
impl UnsafeUnpin for RuleRetriever
impl UnwindSafe for RuleRetriever
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