pub struct RankFeatureLogarithmQuery { /* private fields */ }Expand description
Boosts the relevance score of documents based on the numeric value of a rank_feature or
rank_features field.
To create a rank feature query:
Query::rank_feature("test");To apply mathematical functions:
Query::rank_feature("test").saturation();
Query::rank_feature("test").saturation().pivot(2.2);
Query::rank_feature("test").logarithm(3.0);
Query::rank_feature("test").sigmoid(1.0, 2.0);
Query::rank_feature("test").linear();https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-rank-feature-query.html
Implementations
sourceimpl RankFeatureLogarithmQuery
impl RankFeatureLogarithmQuery
sourcepub fn boost<T>(self, boost: T) -> Selfwhere
T: AsPrimitive<f32>,
pub fn boost<T>(self, boost: T) -> Selfwhere
T: AsPrimitive<f32>,
Floating point number used to decrease or increase the
relevance scores
of a query. Defaults to 1.0.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
Trait Implementations
sourceimpl Clone for RankFeatureLogarithmQuery
impl Clone for RankFeatureLogarithmQuery
sourcefn clone(&self) -> RankFeatureLogarithmQuery
fn clone(&self) -> RankFeatureLogarithmQuery
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for RankFeatureLogarithmQuery
impl Debug for RankFeatureLogarithmQuery
sourceimpl From<RankFeatureLogarithmQuery> for Option<Query>
impl From<RankFeatureLogarithmQuery> for Option<Query>
sourcefn from(q: RankFeatureLogarithmQuery) -> Self
fn from(q: RankFeatureLogarithmQuery) -> Self
Converts to this type from the input type.
sourceimpl From<RankFeatureLogarithmQuery> for Query
impl From<RankFeatureLogarithmQuery> for Query
sourcefn from(q: RankFeatureLogarithmQuery) -> Self
fn from(q: RankFeatureLogarithmQuery) -> Self
Converts to this type from the input type.
sourceimpl IntoIterator for RankFeatureLogarithmQuery
impl IntoIterator for RankFeatureLogarithmQuery
type Item = RankFeatureLogarithmQuery
type Item = RankFeatureLogarithmQuery
The type of the elements being iterated over.
type IntoIter = IntoIter<<RankFeatureLogarithmQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<RankFeatureLogarithmQuery as IntoIterator>::Item>
Which kind of iterator are we turning this into?
sourceimpl PartialEq<RankFeatureLogarithmQuery> for Query
impl PartialEq<RankFeatureLogarithmQuery> for Query
sourcefn eq(&self, other: &RankFeatureLogarithmQuery) -> bool
fn eq(&self, other: &RankFeatureLogarithmQuery) -> bool
sourceimpl PartialEq<RankFeatureLogarithmQuery> for RankFeatureLogarithmQuery
impl PartialEq<RankFeatureLogarithmQuery> for RankFeatureLogarithmQuery
sourcefn eq(&self, other: &RankFeatureLogarithmQuery) -> bool
fn eq(&self, other: &RankFeatureLogarithmQuery) -> bool
sourceimpl Serialize for RankFeatureLogarithmQuery
impl Serialize for RankFeatureLogarithmQuery
impl StructuralPartialEq for RankFeatureLogarithmQuery
Auto Trait Implementations
impl RefUnwindSafe for RankFeatureLogarithmQuery
impl Send for RankFeatureLogarithmQuery
impl Sync for RankFeatureLogarithmQuery
impl Unpin for RankFeatureLogarithmQuery
impl UnwindSafe for RankFeatureLogarithmQuery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more