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
nullor[] - The field has
"index" : falseset in the mapping - The length of the field value exceeded an
ignore_abovesetting in the mapping - The field value was malformed and
ignore_malformedwas 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<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
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 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ExistsQuery
impl Debug for ExistsQuery
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 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 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?
sourceimpl PartialEq<ExistsQuery> for ExistsQuery
impl PartialEq<ExistsQuery> for ExistsQuery
sourcefn eq(&self, other: &ExistsQuery) -> bool
fn eq(&self, other: &ExistsQuery) -> bool
sourceimpl PartialEq<ExistsQuery> for Query
impl PartialEq<ExistsQuery> for Query
sourcefn eq(&self, other: &ExistsQuery) -> bool
fn eq(&self, other: &ExistsQuery) -> bool
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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