Struct elasticsearch_dsl::search::queries::shape::ShapeQuery
source · [−]pub struct ShapeQuery { /* private fields */ }
Expand description
Queries documents that contain fields indexed using the shape
type.
Requires the shape
Mapping.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-shape-query.html
Implementations
sourceimpl ShapeQuery
impl ShapeQuery
sourcepub fn relation(self, relation: SpatialRelation) -> Self
pub fn relation(self, relation: SpatialRelation) -> Self
The shape strategy mapping parameter determines which spatial relation operators may be used at search time.
sourcepub fn ignore_unmapped(self, ignore_unmapped: bool) -> Self
pub fn ignore_unmapped(self, ignore_unmapped: bool) -> Self
When set to true the ignore_unmapped
option will ignore an unmapped
field and will not match any documents for this query. This can be
useful when querying multiple indexes which might have different
mappings. When set to false
(the default value) the query will throw
an exception if the field is not mapped.
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 ShapeQuery
impl Clone for ShapeQuery
sourcefn clone(&self) -> ShapeQuery
fn clone(&self) -> ShapeQuery
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 ShapeQuery
impl Debug for ShapeQuery
sourceimpl From<ShapeQuery> for Query
impl From<ShapeQuery> for Query
sourcefn from(q: ShapeQuery) -> Self
fn from(q: ShapeQuery) -> Self
Converts to this type from the input type.
sourceimpl From<ShapeQuery> for Option<Query>
impl From<ShapeQuery> for Option<Query>
sourcefn from(q: ShapeQuery) -> Self
fn from(q: ShapeQuery) -> Self
Converts to this type from the input type.
sourceimpl From<ShapeQuery> for Queries
impl From<ShapeQuery> for Queries
sourcefn from(q: ShapeQuery) -> Self
fn from(q: ShapeQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<Query> for ShapeQuery
impl PartialEq<Query> for ShapeQuery
sourceimpl PartialEq<ShapeQuery> for ShapeQuery
impl PartialEq<ShapeQuery> for ShapeQuery
sourcefn eq(&self, other: &ShapeQuery) -> bool
fn eq(&self, other: &ShapeQuery) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ShapeQuery) -> bool
fn ne(&self, other: &ShapeQuery) -> bool
This method tests for !=
.
sourceimpl PartialEq<ShapeQuery> for Query
impl PartialEq<ShapeQuery> for Query
sourceimpl Serialize for ShapeQuery
impl Serialize for ShapeQuery
impl StructuralPartialEq for ShapeQuery
Auto Trait Implementations
impl RefUnwindSafe for ShapeQuery
impl Send for ShapeQuery
impl Sync for ShapeQuery
impl Unpin for ShapeQuery
impl UnwindSafe for ShapeQuery
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