[−][src]Struct tique::DisMaxQuery
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DisMaxQuery
[src]
impl Query for DisMaxQuery
[src]
fn weight(
&self,
searcher: &Searcher,
scoring_enabled: bool
) -> Result<Box<dyn Weight>>
[src]
&self,
searcher: &Searcher,
scoring_enabled: bool
) -> Result<Box<dyn Weight>>
fn explain(
&self,
searcher: &Searcher,
doc_address: DocAddress
) -> Result<Explanation, TantivyError>
[src]
&self,
searcher: &Searcher,
doc_address: DocAddress
) -> Result<Explanation, TantivyError>
fn count(&self, searcher: &Searcher) -> Result<usize, TantivyError>
[src]
fn query_terms(&self, _term_set: &mut BTreeSet<Term<Vec<u8>>>)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for DisMaxQuery
impl !Send for DisMaxQuery
impl !Sync for DisMaxQuery
impl Unpin for DisMaxQuery
impl !UnwindSafe for DisMaxQuery
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,