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§
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§impl PartialEq<Query> for ExistsQuery
impl PartialEq<Query> for ExistsQuery
source§impl PartialEq for ExistsQuery
impl PartialEq for ExistsQuery
source§impl Serialize for ExistsQuery
impl Serialize for ExistsQuery
impl StructuralPartialEq for ExistsQuery
Auto Trait Implementations§
impl Freeze for ExistsQuery
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)