pub struct RankFeatureSaturationQuery { /* 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§
source§impl RankFeatureSaturationQuery
impl RankFeatureSaturationQuery
pub fn serialize<__S>(
__self: &RankFeatureSaturationQuery,
__serializer: __S
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
source§impl RankFeatureSaturationQuery
impl RankFeatureSaturationQuery
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§
source§impl Clone for RankFeatureSaturationQuery
impl Clone for RankFeatureSaturationQuery
source§fn clone(&self) -> RankFeatureSaturationQuery
fn clone(&self) -> RankFeatureSaturationQuery
Returns a copy of the value. Read more
1.0.0 · 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 RankFeatureSaturationQuery
impl Debug for RankFeatureSaturationQuery
source§impl From<RankFeatureSaturationQuery> for Option<Query>
impl From<RankFeatureSaturationQuery> for Option<Query>
source§fn from(q: RankFeatureSaturationQuery) -> Self
fn from(q: RankFeatureSaturationQuery) -> Self
Converts to this type from the input type.
source§impl From<RankFeatureSaturationQuery> for Query
impl From<RankFeatureSaturationQuery> for Query
source§fn from(q: RankFeatureSaturationQuery) -> Self
fn from(q: RankFeatureSaturationQuery) -> Self
Converts to this type from the input type.
source§impl IntoIterator for RankFeatureSaturationQuery
impl IntoIterator for RankFeatureSaturationQuery
§type Item = RankFeatureSaturationQuery
type Item = RankFeatureSaturationQuery
The type of the elements being iterated over.
§type IntoIter = IntoIter<<RankFeatureSaturationQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<RankFeatureSaturationQuery as IntoIterator>::Item>
Which kind of iterator are we turning this into?
source§impl PartialEq<Query> for RankFeatureSaturationQuery
impl PartialEq<Query> for RankFeatureSaturationQuery
source§impl PartialEq<RankFeatureSaturationQuery> for Query
impl PartialEq<RankFeatureSaturationQuery> for Query
source§fn eq(&self, other: &RankFeatureSaturationQuery) -> bool
fn eq(&self, other: &RankFeatureSaturationQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for RankFeatureSaturationQuery
impl PartialEq for RankFeatureSaturationQuery
source§fn eq(&self, other: &RankFeatureSaturationQuery) -> bool
fn eq(&self, other: &RankFeatureSaturationQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RankFeatureSaturationQuery
Auto Trait Implementations§
impl RefUnwindSafe for RankFeatureSaturationQuery
impl Send for RankFeatureSaturationQuery
impl Sync for RankFeatureSaturationQuery
impl Unpin for RankFeatureSaturationQuery
impl UnwindSafe for RankFeatureSaturationQuery
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