Search Results for

    Show / Hide Table of Contents

    Class GeoDistanceSortDescriptor<T>

    Allows you to sort based on a proximity to one or more GeoLocation

    Inheritance
    object
    DescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort>
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>
    GeoDistanceSortDescriptor<T>
    Implements
    IDescriptor
    IGeoDistanceSort
    ISort
    Inherited Members
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.SortKey
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.Ascending()
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.Descending()
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.Order(SortOrder?)
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.NumericType(NumericType?)
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.Mode(SortMode?)
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.MissingLast()
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.MissingFirst()
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.Missing(object)
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.Nested(Func<NestedSortDescriptor<T>, INestedSort>)
    DescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort>.Self
    DescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort>.Assign<TValue>(TValue, Action<IGeoDistanceSort, TValue>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public class GeoDistanceSortDescriptor<T> : SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>, IDescriptor, IGeoDistanceSort, ISort where T : class
    Type Parameters
    Name Description
    T

    Properties

    | Edit this page View Source

    SortKey

    The field on which to sort

    Declaration
    protected override Field SortKey { get; }
    Property Value
    Type Description
    Field
    Overrides
    SortDescriptorBase<GeoDistanceSortDescriptor<T>, IGeoDistanceSort, T>.SortKey

    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
    Type Name Description
    GeoDistanceType? distanceType
    Returns
    Type Description
    GeoDistanceSortDescriptor<T>
    | Edit this page View Source

    Field(Field)

    Declaration
    public GeoDistanceSortDescriptor<T> Field(Field field)
    Parameters
    Type Name Description
    Field field
    Returns
    Type Description
    GeoDistanceSortDescriptor<T>
    | Edit this page View Source

    Field<TValue>(Expression<Func<T, TValue>>)

    Declaration
    public GeoDistanceSortDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> objectPath)
    Parameters
    Type Name Description
    Expression<Func<T, TValue>> objectPath
    Returns
    Type Description
    GeoDistanceSortDescriptor<T>
    Type Parameters
    Name Description
    TValue
    | 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
    Type Description
    GeoDistanceSortDescriptor<T>
    | Edit this page View Source

    Points(params GeoLocation[])

    Declaration
    public GeoDistanceSortDescriptor<T> Points(params GeoLocation[] geoLocations)
    Parameters
    Type Name Description
    GeoLocation[] geoLocations
    Returns
    Type Description
    GeoDistanceSortDescriptor<T>
    | Edit this page View Source

    Points(IEnumerable<GeoLocation>)

    Declaration
    public GeoDistanceSortDescriptor<T> Points(IEnumerable<GeoLocation> geoLocations)
    Parameters
    Type Name Description
    IEnumerable<GeoLocation> geoLocations
    Returns
    Type Description
    GeoDistanceSortDescriptor<T>
    | 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
    Type Name Description
    DistanceUnit? unit
    Returns
    Type Description
    GeoDistanceSortDescriptor<T>

    Implements

    IDescriptor
    IGeoDistanceSort
    ISort

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • SortKey
    • Methods
      • DistanceType(GeoDistanceType?)
      • Field(Field)
      • Field<TValue>(Expression<Func<T, TValue>>)
      • IgnoreUnmapped(bool?)
      • Points(params GeoLocation[])
      • Points(IEnumerable<GeoLocation>)
      • Unit(DistanceUnit?)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX