pub struct RankFeatureSigmoidQuery { /* 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 RankFeatureSigmoidQuery
impl RankFeatureSigmoidQuery
sourcepub fn boost<B>(self, boost: B) -> Self where
B: TryInto<Boost>,
pub fn boost<B>(self, boost: B) -> Self where
B: TryInto<Boost>,
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 RankFeatureSigmoidQuery
impl Clone for RankFeatureSigmoidQuery
sourcefn clone(&self) -> RankFeatureSigmoidQuery
fn clone(&self) -> RankFeatureSigmoidQuery
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RankFeatureSigmoidQuery
impl Debug for RankFeatureSigmoidQuery
sourceimpl From<RankFeatureSigmoidQuery> for Query
impl From<RankFeatureSigmoidQuery> for Query
sourcefn from(q: RankFeatureSigmoidQuery) -> Self
fn from(q: RankFeatureSigmoidQuery) -> Self
Converts to this type from the input type.
sourceimpl From<RankFeatureSigmoidQuery> for Option<Query>
impl From<RankFeatureSigmoidQuery> for Option<Query>
sourcefn from(q: RankFeatureSigmoidQuery) -> Self
fn from(q: RankFeatureSigmoidQuery) -> Self
Converts to this type from the input type.
sourceimpl From<RankFeatureSigmoidQuery> for Queries
impl From<RankFeatureSigmoidQuery> for Queries
sourcefn from(q: RankFeatureSigmoidQuery) -> Self
fn from(q: RankFeatureSigmoidQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<Query> for RankFeatureSigmoidQuery
impl PartialEq<Query> for RankFeatureSigmoidQuery
sourceimpl PartialEq<RankFeatureSigmoidQuery> for RankFeatureSigmoidQuery
impl PartialEq<RankFeatureSigmoidQuery> for RankFeatureSigmoidQuery
sourcefn eq(&self, other: &RankFeatureSigmoidQuery) -> bool
fn eq(&self, other: &RankFeatureSigmoidQuery) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RankFeatureSigmoidQuery) -> bool
fn ne(&self, other: &RankFeatureSigmoidQuery) -> bool
This method tests for !=
.
sourceimpl PartialEq<RankFeatureSigmoidQuery> for Query
impl PartialEq<RankFeatureSigmoidQuery> for Query
sourceimpl Serialize for RankFeatureSigmoidQuery
impl Serialize for RankFeatureSigmoidQuery
impl StructuralPartialEq for RankFeatureSigmoidQuery
Auto Trait Implementations
impl RefUnwindSafe for RankFeatureSigmoidQuery
impl Send for RankFeatureSigmoidQuery
impl Sync for RankFeatureSigmoidQuery
impl Unpin for RankFeatureSigmoidQuery
impl UnwindSafe for RankFeatureSigmoidQuery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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