[][src]Struct tique::DisMaxQuery

pub struct DisMaxQuery { /* fields omitted */ }

A Maximum Disjunction query, as popularized by Lucene/Solr

A DisMax query is one that behaves as the union of its sub-queries and the resulting documents are scored as the best score over each sub-query plus a configurable increment based on additional matches.

The final score formula is score = max + (sum - max) * tiebreaker, so with a tiebreaker of 0.0 you get only the maximum score and if you turn it up to 1.0 the score ends up being the sum of all scores, just like a plain "should" BooleanQuery would.

Methods

impl DisMaxQuery[src]

pub fn new(disjuncts: Vec<Box<dyn Query>>, tiebreaker: f32) -> Self[src]

Create a union-like query that picks the best score instead of the sum

Panics if tiebreaker is not within the [0,1] range

Trait Implementations

impl Clone for DisMaxQuery[src]

impl Debug for DisMaxQuery[src]

impl Query for DisMaxQuery[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,