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