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
sourceimpl ExistsQuery
impl ExistsQuery
sourcepub fn boost<B>(self, boost: B) -> Self where
B: TryInto<Boost>,
pub fn boost<B>(self, boost: B) -> Self where
B: TryInto<Boost>,
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
sourceimpl Clone for ExistsQuery
impl Clone for ExistsQuery
sourcefn clone(&self) -> ExistsQuery
fn clone(&self) -> ExistsQuery
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExistsQuery
impl Debug for ExistsQuery
sourceimpl From<ExistsQuery> for Query
impl From<ExistsQuery> for Query
sourcefn from(q: ExistsQuery) -> Self
fn from(q: ExistsQuery) -> Self
Converts to this type from the input type.
sourceimpl From<ExistsQuery> for Option<Query>
impl From<ExistsQuery> for Option<Query>
sourcefn from(q: ExistsQuery) -> Self
fn from(q: ExistsQuery) -> Self
Converts to this type from the input type.
sourceimpl From<ExistsQuery> for Queries
impl From<ExistsQuery> for Queries
sourcefn from(q: ExistsQuery) -> Self
fn from(q: ExistsQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<ExistsQuery> for ExistsQuery
impl PartialEq<ExistsQuery> for ExistsQuery
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ExistsQuery) -> bool
fn ne(&self, other: &ExistsQuery) -> bool
This method tests for !=
.
sourceimpl PartialEq<ExistsQuery> for Query
impl PartialEq<ExistsQuery> for Query
sourceimpl PartialEq<Query> for ExistsQuery
impl PartialEq<Query> for ExistsQuery
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more