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) -> Self
pub fn new<T, U>(field: T, points: U) -> Self
Creates an instance of GeoDistanceSort
Sourcepub fn ascending<T, U>(field: T, points: U) -> Self
pub fn ascending<T, U>(field: T, points: U) -> Self
Creates an instance of GeoDistanceSort by ascending order
Sourcepub fn descending<T, U>(field: T, points: U) -> Self
pub fn descending<T, U>(field: T, points: U) -> Self
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 duplicate 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
Source§impl PartialEq for GeoDistanceSort
impl PartialEq for GeoDistanceSort
Source§impl Serialize for GeoDistanceSort
impl Serialize for GeoDistanceSort
impl StructuralPartialEq for GeoDistanceSort
Auto Trait Implementations§
impl Freeze for GeoDistanceSort
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