Struct elasticsearch_dsl::search::queries::geo::GeoDistanceQuery
source · [−]pub struct GeoDistanceQuery { /* private fields */ }
Expand description
Matches geo_point and geo_shape values within a given distance of a geopoint.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html
Implementations
sourceimpl GeoDistanceQuery
impl GeoDistanceQuery
sourcepub fn validation_method(
self,
validation_method: impl Into<ValidationMethod>
) -> Self
pub fn validation_method(
self,
validation_method: impl Into<ValidationMethod>
) -> Self
Set to IGNORE_MALFORMED
to accept geo points with invalid latitude or longitude, set to
COERCE
to also try to infer correct latitude or longitude. (default is STRICT
).
sourcepub fn distance_type(self, distance_type: impl Into<DistanceType>) -> Self
pub fn distance_type(self, distance_type: impl Into<DistanceType>) -> Self
How to compute the distance. Can either be Arc
(default),
or Plane
(faster, but inaccurate on long distances and close to the poles).
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 GeoDistanceQuery
impl Clone for GeoDistanceQuery
sourcefn clone(&self) -> GeoDistanceQuery
fn clone(&self) -> GeoDistanceQuery
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 GeoDistanceQuery
impl Debug for GeoDistanceQuery
sourceimpl From<GeoDistanceQuery> for Query
impl From<GeoDistanceQuery> for Query
sourcefn from(q: GeoDistanceQuery) -> Self
fn from(q: GeoDistanceQuery) -> Self
Converts to this type from the input type.
sourceimpl From<GeoDistanceQuery> for Option<Query>
impl From<GeoDistanceQuery> for Option<Query>
sourcefn from(q: GeoDistanceQuery) -> Self
fn from(q: GeoDistanceQuery) -> Self
Converts to this type from the input type.
sourceimpl From<GeoDistanceQuery> for Queries
impl From<GeoDistanceQuery> for Queries
sourcefn from(q: GeoDistanceQuery) -> Self
fn from(q: GeoDistanceQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<GeoDistanceQuery> for GeoDistanceQuery
impl PartialEq<GeoDistanceQuery> for GeoDistanceQuery
sourcefn eq(&self, other: &GeoDistanceQuery) -> bool
fn eq(&self, other: &GeoDistanceQuery) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GeoDistanceQuery) -> bool
fn ne(&self, other: &GeoDistanceQuery) -> bool
This method tests for !=
.
sourceimpl PartialEq<GeoDistanceQuery> for Query
impl PartialEq<GeoDistanceQuery> for Query
sourceimpl PartialEq<Query> for GeoDistanceQuery
impl PartialEq<Query> for GeoDistanceQuery
sourceimpl Serialize for GeoDistanceQuery
impl Serialize for GeoDistanceQuery
impl StructuralPartialEq for GeoDistanceQuery
Auto Trait Implementations
impl RefUnwindSafe for GeoDistanceQuery
impl Send for GeoDistanceQuery
impl Sync for GeoDistanceQuery
impl Unpin for GeoDistanceQuery
impl UnwindSafe for GeoDistanceQuery
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