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/opensearch/reference/current/query-dsl-shape-query.html
Implementations§
Source§impl<'de> ShapeQuery
impl<'de> ShapeQuery
pub fn deserialize<__D>(__deserializer: __D) -> Result<ShapeQuery, __D::Error>where
__D: Deserializer<'de>,
Source§impl ShapeQuery
impl ShapeQuery
pub fn serialize<__S>(
__self: &ShapeQuery,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl ShapeQuery
impl ShapeQuery
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.
Sourcepub fn name<S>(self, name: S) -> Selfwhere
S: ToString,
pub fn name<S>(self, name: S) -> Selfwhere
S: ToString,
You can use named queries to track which queries matched
returned documents. If named queries are used, the response
includes a matched_queries property for each hit.
https://www.elastic.co/guide/en/opensearch/reference/current/query-dsl-bool-query.html#named-queries
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.
Trait Implementations§
Source§impl Clone for ShapeQuery
impl Clone for ShapeQuery
Source§fn clone(&self) -> ShapeQuery
fn clone(&self) -> ShapeQuery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShapeQuery
impl Debug for ShapeQuery
Source§impl Default for ShapeQuery
impl Default for ShapeQuery
Source§fn default() -> ShapeQuery
fn default() -> ShapeQuery
Source§impl<'de> Deserialize<'de> for ShapeQuery
impl<'de> Deserialize<'de> for ShapeQuery
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl From<ShapeQuery> for Query
impl From<ShapeQuery> for Query
Source§fn from(q: ShapeQuery) -> Self
fn from(q: ShapeQuery) -> Self
Source§impl From<ShapeQuery> for Option<Query>
impl From<ShapeQuery> for Option<Query>
Source§fn from(q: ShapeQuery) -> Self
fn from(q: ShapeQuery) -> Self
Source§impl IntoIterator for ShapeQuery
impl IntoIterator for ShapeQuery
Source§impl PartialEq for ShapeQuery
impl PartialEq for ShapeQuery
Source§fn eq(&self, other: &ShapeQuery) -> bool
fn eq(&self, other: &ShapeQuery) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<Query> for ShapeQuery
impl PartialEq<Query> for ShapeQuery
Source§impl PartialEq<ShapeQuery> for Query
impl PartialEq<ShapeQuery> for Query
Source§fn eq(&self, other: &ShapeQuery) -> bool
fn eq(&self, other: &ShapeQuery) -> bool
self and other values to be equal, and is used by ==.