Search Results for

    Show / Hide Table of Contents

    Class DistanceFeatureQuery

    Boosts the relevance score of documents closer to a provided origin date or point. For example, you can use this query to give more weight to documents closer to a certain date or location. You can use the distance_feature query to find the nearest neighbors to a location. You can also use the query in a bool search’s should filter to add boosted relevance scores to the bool query’s scores.

    Inheritance
    object
    QueryBase
    FieldNameQueryBase
    DistanceFeatureQuery
    Implements
    IDistanceFeatureQuery
    IFieldNameQuery
    IQuery
    Inherited Members
    FieldNameQueryBase.Field
    QueryBase.Boost
    QueryBase.IsStrict
    QueryBase.IsVerbatim
    QueryBase.IsWritable
    QueryBase.Name
    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 DistanceFeatureQuery : FieldNameQueryBase, IDistanceFeatureQuery, IFieldNameQuery, IQuery

    Properties

    | Edit this page View Source

    Conditionless

    Declaration
    protected override bool Conditionless { get; }
    Property Value
    Type Description
    bool
    Overrides
    QueryBase.Conditionless
    | Edit this page View Source

    Origin

    Date or point of origin used to calculate distances. If the field value is a date or date_nanos field, the origin value must be a date. Date Math, such as now-1h, is supported. If the field value is a geo_point field, the origin value must be a geopoint.

    Declaration
    public Union<GeoCoordinate, DateMath> Origin { get; set; }
    Property Value
    Type Description
    Union<GeoCoordinate, DateMath>
    | Edit this page View Source

    Pivot

    Distance from the origin at which relevance scores receive half of the boost value. If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m.

    Declaration
    public Union<Distance, Time> Pivot { get; set; }
    Property Value
    Type Description
    Union<Distance, Time>

    Implements

    IDistanceFeatureQuery
    IFieldNameQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Conditionless
      • Origin
      • Pivot
    • Implements
    • Extension Methods
    Back to top Generated by DocFX