Struct elasticsearch_dsl::search::queries::MatchNoneQuery
source · pub struct MatchNoneQuery { /* private fields */ }
Expand description
This is the inverse of the match_all
query, which matches no documents.
To create match_none query:
Query::match_none()
.boost(2)
.name("matches_nothing");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html
Implementations§
source§impl MatchNoneQuery
impl MatchNoneQuery
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 MatchNoneQuery
impl Clone for MatchNoneQuery
source§fn clone(&self) -> MatchNoneQuery
fn clone(&self) -> MatchNoneQuery
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 MatchNoneQuery
impl Debug for MatchNoneQuery
source§impl Default for MatchNoneQuery
impl Default for MatchNoneQuery
source§fn default() -> MatchNoneQuery
fn default() -> MatchNoneQuery
Returns the “default value” for a type. Read more
source§impl From<MatchNoneQuery> for Option<Query>
impl From<MatchNoneQuery> for Option<Query>
source§fn from(q: MatchNoneQuery) -> Self
fn from(q: MatchNoneQuery) -> Self
Converts to this type from the input type.
source§impl From<MatchNoneQuery> for Query
impl From<MatchNoneQuery> for Query
source§fn from(q: MatchNoneQuery) -> Self
fn from(q: MatchNoneQuery) -> Self
Converts to this type from the input type.
source§impl IntoIterator for MatchNoneQuery
impl IntoIterator for MatchNoneQuery
§type Item = MatchNoneQuery
type Item = MatchNoneQuery
The type of the elements being iterated over.
§type IntoIter = IntoIter<<MatchNoneQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<MatchNoneQuery as IntoIterator>::Item>
Which kind of iterator are we turning this into?