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
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