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
pub fn serialize<__S>(
__self: &MatchAllQuery,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
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
Source§impl PartialEq<MatchAllQuery> for Query
impl PartialEq<MatchAllQuery> for Query
Source§impl PartialEq<Query> for MatchAllQuery
impl PartialEq<Query> for MatchAllQuery
Source§impl PartialEq for MatchAllQuery
impl PartialEq for MatchAllQuery
Source§impl Serialize for MatchAllQuery
impl Serialize for MatchAllQuery
impl StructuralPartialEq for MatchAllQuery
Auto Trait Implementations§
impl Freeze for MatchAllQuery
impl RefUnwindSafe for MatchAllQuery
impl Send for MatchAllQuery
impl Sync for MatchAllQuery
impl Unpin for MatchAllQuery
impl UnwindSafe for MatchAllQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more