Struct elasticsearch_dsl::search::queries::term_level::ExistsQuery
source · pub struct ExistsQuery { /* private fields */ }
Expand description
Returns documents that contain an indexed value for a field.
An indexed value may not exist for a document’s field due to a variety of reasons:
- The field in the source JSON is
null
or[]
- The field has
"index" : false
set in the mapping - The length of the field value exceeded an
ignore_above
setting in the mapping - The field value was malformed and
ignore_malformed
was defined in the mapping
To create exists query:
Query::exists("test");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html
Implementations§
source§impl ExistsQuery
impl ExistsQuery
pub fn serialize<__S>(
__self: &ExistsQuery,
__serializer: __S
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
source§impl ExistsQuery
impl ExistsQuery
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 ExistsQuery
impl Clone for ExistsQuery
source§fn clone(&self) -> ExistsQuery
fn clone(&self) -> ExistsQuery
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 ExistsQuery
impl Debug for ExistsQuery
source§impl From<ExistsQuery> for Option<Query>
impl From<ExistsQuery> for Option<Query>
source§fn from(q: ExistsQuery) -> Self
fn from(q: ExistsQuery) -> Self
Converts to this type from the input type.
source§impl From<ExistsQuery> for Query
impl From<ExistsQuery> for Query
source§fn from(q: ExistsQuery) -> Self
fn from(q: ExistsQuery) -> Self
Converts to this type from the input type.
source§impl IntoIterator for ExistsQuery
impl IntoIterator for ExistsQuery
§type Item = ExistsQuery
type Item = ExistsQuery
The type of the elements being iterated over.
§type IntoIter = IntoIter<<ExistsQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<ExistsQuery as IntoIterator>::Item>
Which kind of iterator are we turning this into?
source§impl PartialEq<ExistsQuery> for Query
impl PartialEq<ExistsQuery> for Query
source§fn eq(&self, other: &ExistsQuery) -> bool
fn eq(&self, other: &ExistsQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<Query> for ExistsQuery
impl PartialEq<Query> for ExistsQuery
source§impl PartialEq for ExistsQuery
impl PartialEq for ExistsQuery
source§fn eq(&self, other: &ExistsQuery) -> bool
fn eq(&self, other: &ExistsQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ExistsQuery
impl Serialize for ExistsQuery
impl StructuralPartialEq for ExistsQuery
Auto Trait Implementations§
impl RefUnwindSafe for ExistsQuery
impl Send for ExistsQuery
impl Sync for ExistsQuery
impl Unpin for ExistsQuery
impl UnwindSafe for ExistsQuery
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