pub struct FunctionScoreQuery<S = Root> { /* private fields */ }Expand description
Implementations§
Source§impl<S> FunctionScoreQuery<S>
impl<S> FunctionScoreQuery<S>
Sourcepub fn weight(self, weight: f32) -> Self
pub fn weight(self, weight: f32) -> Self
Add a constant weight function applied to every match.
Sourcepub fn weight_when(self, weight: f32, filter: impl AsQuery<S>) -> Self
pub fn weight_when(self, weight: f32, filter: impl AsQuery<S>) -> Self
Add a constant weight function applied only to matches of filter.
Sourcepub fn function(self, function: Value) -> Self
pub fn function(self, function: Value) -> Self
Add a raw function entry (e.g. a field_value_factor, gauss, or
script_score object) — the escape hatch for the long tail of function
types, still composed into the typed clause.
Sourcepub fn score_mode(self, score_mode: ScoreMode) -> Self
pub fn score_mode(self, score_mode: ScoreMode) -> Self
How the functions combine (ScoreMode::Multiply is the default).
Sourcepub fn boost_mode(self, boost_mode: BoostMode) -> Self
pub fn boost_mode(self, boost_mode: BoostMode) -> Self
How the function score combines with the query score
(BoostMode::Multiply is the default).
Trait Implementations§
Source§impl<S> AsQuery<S> for FunctionScoreQuery<S>
impl<S> AsQuery<S> for FunctionScoreQuery<S>
Source§fn into_query(self) -> Option<Query<S>>
fn into_query(self) -> Option<Query<S>>
The clause this produces, or
None to contribute nothing.Source§fn and(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
fn and(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
self AND other. An absent side is the identity.Source§fn or(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
fn or(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
self OR other. An absent side is the identity.Source§impl<S: Clone> Clone for FunctionScoreQuery<S>
impl<S: Clone> Clone for FunctionScoreQuery<S>
Source§fn clone(&self) -> FunctionScoreQuery<S>
fn clone(&self) -> FunctionScoreQuery<S>
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 moreAuto Trait Implementations§
impl<S> Freeze for FunctionScoreQuery<S>
impl<S> RefUnwindSafe for FunctionScoreQuery<S>
impl<S> Send for FunctionScoreQuery<S>
impl<S> Sync for FunctionScoreQuery<S>
impl<S> Unpin for FunctionScoreQuery<S>
impl<S> UnsafeUnpin for FunctionScoreQuery<S>
impl<S> UnwindSafe for FunctionScoreQuery<S>
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