pub struct RankFeatureLinearQuery { /* 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 RankFeatureLinearQuery
impl RankFeatureLinearQuery
pub fn serialize<__S>(
__self: &RankFeatureLinearQuery,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl RankFeatureLinearQuery
impl RankFeatureLinearQuery
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 RankFeatureLinearQuery
impl Clone for RankFeatureLinearQuery
Source§fn clone(&self) -> RankFeatureLinearQuery
fn clone(&self) -> RankFeatureLinearQuery
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 RankFeatureLinearQuery
impl Debug for RankFeatureLinearQuery
Source§impl From<RankFeatureLinearQuery> for Option<Query>
impl From<RankFeatureLinearQuery> for Option<Query>
Source§fn from(q: RankFeatureLinearQuery) -> Self
fn from(q: RankFeatureLinearQuery) -> Self
Converts to this type from the input type.
Source§impl From<RankFeatureLinearQuery> for Query
impl From<RankFeatureLinearQuery> for Query
Source§fn from(q: RankFeatureLinearQuery) -> Self
fn from(q: RankFeatureLinearQuery) -> Self
Converts to this type from the input type.
Source§impl PartialEq<Query> for RankFeatureLinearQuery
impl PartialEq<Query> for RankFeatureLinearQuery
Source§impl PartialEq<RankFeatureLinearQuery> for Query
impl PartialEq<RankFeatureLinearQuery> for Query
Source§impl PartialEq for RankFeatureLinearQuery
impl PartialEq for RankFeatureLinearQuery
Source§impl Serialize for RankFeatureLinearQuery
impl Serialize for RankFeatureLinearQuery
impl StructuralPartialEq for RankFeatureLinearQuery
Auto Trait Implementations§
impl Freeze for RankFeatureLinearQuery
impl RefUnwindSafe for RankFeatureLinearQuery
impl Send for RankFeatureLinearQuery
impl Sync for RankFeatureLinearQuery
impl Unpin for RankFeatureLinearQuery
impl UnwindSafe for RankFeatureLinearQuery
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