Struct elasticsearch_dsl::search::sort::GeoDistanceSort
source · [−]pub struct GeoDistanceSort { /* private fields */ }
Expand description
Sorts search hits by other field values
Implementations
sourceimpl GeoDistanceSort
impl GeoDistanceSort
sourcepub fn new<T, U>(field: T, points: U) -> Self where
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
pub fn new<T, U>(field: T, points: U) -> Self where
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
Creates an instance of GeoDistanceSort
sourcepub fn ascending<T, U>(field: T, points: U) -> Self where
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
pub fn ascending<T, U>(field: T, points: U) -> Self where
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
Creates an instance of GeoDistanceSort by ascending order
sourcepub fn descending<T, U>(field: T, points: U) -> Self where
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
pub fn descending<T, U>(field: T, points: U) -> Self where
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
Creates an instance of GeoDistanceSort by descending order
sourcepub fn unit(self, unit: DistanceUnit) -> Self
pub fn unit(self, unit: DistanceUnit) -> Self
The unit to use when computing sort values
https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html#geo-sorting
sourcepub fn distance_type(self, distance_type: GeoDistanceType) -> Self
pub fn distance_type(self, distance_type: GeoDistanceType) -> 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 ignore_unmapped(self, ignore_unmapped: bool) -> Self
pub fn ignore_unmapped(self, ignore_unmapped: bool) -> Self
Indicates if the unmapped field should be treated as a missing value. Setting it to true
is equivalent to specifying an unmapped_type
in the field sort. The default is false
(unmapped field cause the search to fail).
Trait Implementations
sourceimpl Clone for GeoDistanceSort
impl Clone for GeoDistanceSort
sourcefn clone(&self) -> GeoDistanceSort
fn clone(&self) -> GeoDistanceSort
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 GeoDistanceSort
impl Debug for GeoDistanceSort
sourceimpl From<GeoDistanceSort> for Sort
impl From<GeoDistanceSort> for Sort
sourcefn from(value: GeoDistanceSort) -> Self
fn from(value: GeoDistanceSort) -> Self
Converts to this type from the input type.
sourceimpl IntoIterator for GeoDistanceSort
impl IntoIterator for GeoDistanceSort
type Item = GeoDistanceSort
type Item = GeoDistanceSort
The type of the elements being iterated over.
type IntoIter = IntoIter<<GeoDistanceSort as IntoIterator>::Item>
type IntoIter = IntoIter<<GeoDistanceSort as IntoIterator>::Item>
Which kind of iterator are we turning this into?
sourceimpl PartialEq<GeoDistanceSort> for GeoDistanceSort
impl PartialEq<GeoDistanceSort> for GeoDistanceSort
sourcefn eq(&self, other: &GeoDistanceSort) -> bool
fn eq(&self, other: &GeoDistanceSort) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GeoDistanceSort) -> bool
fn ne(&self, other: &GeoDistanceSort) -> bool
This method tests for !=
.
sourceimpl Serialize for GeoDistanceSort
impl Serialize for GeoDistanceSort
impl StructuralPartialEq for GeoDistanceSort
Auto Trait Implementations
impl RefUnwindSafe for GeoDistanceSort
impl Send for GeoDistanceSort
impl Sync for GeoDistanceSort
impl Unpin for GeoDistanceSort
impl UnwindSafe for GeoDistanceSort
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