Class GeoDistanceSortDescriptor<T>
Allows you to sort based on a proximity to one or more GeoLocation
Inheritance
GeoDistanceSortDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class GeoDistanceSortDescriptor<T> : SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>, IDescriptor, IGeoDistanceSort, ISort where T : class
Type Parameters
Properties
|
Edit this page
View Source
SortKey
The field on which to sort
Declaration
protected override Field SortKey { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
DistanceType(GeoDistanceType?)
How to compute the distance. Can either be arc (default), or plane (faster, but
inaccurate on long distances and close to the poles).
Declaration
public GeoDistanceSortDescriptor<T> DistanceType(GeoDistanceType? distanceType)
Parameters
Returns
|
Edit this page
View Source
Field(Field)
Declaration
public GeoDistanceSortDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
Declaration
public GeoDistanceSortDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
IgnoreUnmapped(bool?)
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 are causing the search to fail)
Declaration
public GeoDistanceSortDescriptor<T> IgnoreUnmapped(bool? ignoreUnmapped = true)
Parameters
Type |
Name |
Description |
bool? |
ignoreUnmapped |
|
Returns
|
Edit this page
View Source
Points(params GeoLocation[])
Declaration
public GeoDistanceSortDescriptor<T> Points(params GeoLocation[] geoLocations)
Parameters
Returns
|
Edit this page
View Source
Points(IEnumerable<GeoLocation>)
Declaration
public GeoDistanceSortDescriptor<T> Points(IEnumerable<GeoLocation> geoLocations)
Parameters
Returns
|
Edit this page
View Source
Unit(DistanceUnit?)
The unit to use when computing sort values. The default is m (meters)
Declaration
public GeoDistanceSortDescriptor<T> Unit(DistanceUnit? unit)
Parameters
Returns
Implements
Extension Methods