Struct elasticsearch_dsl::search::queries::params::TieBreaker
source · [−]pub struct TieBreaker(_);Expand description
Floating point number between 0 and 1.0 used to increase the
relevance scores
of documents matching multiple query clauses. Defaults to 0.0.
You can use the tie_breaker value to assign higher relevance scores to
documents that contain the same term in multiple fields than documents that
contain this term in only the best of those multiple fields, without
confusing this with the better case of two different terms in the multiple
fields.
If a document matches multiple clauses, the dis_max query calculates
the relevance score for the document as follows:
- Take the relevance score from a matching clause with the highest score.
- Multiply the score from any other matching clauses by the tie_breaker value.
- Add the highest score to the multiplied scores.
If the tie_breaker value is greater than 0.0, all matching clauses
count, but the clause with the highest score counts most.
Trait Implementations
sourceimpl Clone for TieBreaker
impl Clone for TieBreaker
sourcefn clone(&self) -> TieBreaker
fn clone(&self) -> TieBreaker
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 TieBreaker
impl Debug for TieBreaker
sourceimpl PartialEq<TieBreaker> for TieBreaker
impl PartialEq<TieBreaker> for TieBreaker
sourcefn eq(&self, other: &TieBreaker) -> bool
fn eq(&self, other: &TieBreaker) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &TieBreaker) -> bool
fn ne(&self, other: &TieBreaker) -> bool
This method tests for !=.
sourceimpl Serialize for TieBreaker
impl Serialize for TieBreaker
sourceimpl TryFrom<f32> for TieBreaker
impl TryFrom<f32> for TieBreaker
impl Copy for TieBreaker
impl StructuralPartialEq for TieBreaker
Auto Trait Implementations
impl RefUnwindSafe for TieBreaker
impl Send for TieBreaker
impl Sync for TieBreaker
impl Unpin for TieBreaker
impl UnwindSafe for TieBreaker
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more