Struct elasticsearch_dsl::search::sort::GeoDistanceSort
source · pub struct GeoDistanceSort { /* private fields */ }
Expand description
Sorts search hits by other field values
Implementations§
source§impl GeoDistanceSort
impl GeoDistanceSort
pub fn serialize<__S>( __self: &GeoDistanceSort, __serializer: __S ) -> Result<__S::Ok, __S::Error>where __S: Serializer,
source§impl GeoDistanceSort
impl GeoDistanceSort
sourcepub fn new<T, U>(field: T, points: U) -> Selfwhere
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
pub fn new<T, U>(field: T, points: U) -> Selfwhere T: ToString, U: IntoIterator, U::Item: Into<GeoLocation>,
Creates an instance of GeoDistanceSort
sourcepub fn ascending<T, U>(field: T, points: U) -> Selfwhere
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
pub fn ascending<T, U>(field: T, points: U) -> Selfwhere 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) -> Selfwhere
T: ToString,
U: IntoIterator,
U::Item: Into<GeoLocation>,
pub fn descending<T, U>(field: T, points: U) -> Selfwhere 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§
source§impl Clone for GeoDistanceSort
impl Clone for GeoDistanceSort
source§fn clone(&self) -> GeoDistanceSort
fn clone(&self) -> GeoDistanceSort
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 GeoDistanceSort
impl Debug for GeoDistanceSort
source§impl From<GeoDistanceSort> for Sort
impl From<GeoDistanceSort> for Sort
source§fn from(value: GeoDistanceSort) -> Self
fn from(value: GeoDistanceSort) -> Self
Converts to this type from the input type.
source§impl 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?
source§impl PartialEq<GeoDistanceSort> for GeoDistanceSort
impl PartialEq<GeoDistanceSort> for GeoDistanceSort
source§fn 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 ==
.source§impl 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§
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