Search Results for

    Show / Hide Table of Contents

    Class RankFeatureQueryDescriptor<T>

    Inheritance
    object
    DescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>
    FieldNameQueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery, T>
    RankFeatureQueryDescriptor<T>
    Implements
    IDescriptor
    IRankFeatureQuery
    IFieldNameQuery
    IQuery
    Inherited Members
    FieldNameQueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery, T>.Field(Field)
    FieldNameQueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery, T>.Field<TValue>(Expression<Func<T, TValue>>)
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Conditionless
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Name(string)
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Boost(double?)
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Verbatim(bool)
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Strict(bool)
    DescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Self
    DescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Assign<TValue>(TValue, Action<IRankFeatureQuery, 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 RankFeatureQueryDescriptor<T> : FieldNameQueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery, T>, IDescriptor, IRankFeatureQuery, IFieldNameQuery, IQuery where T : class
    Type Parameters
    Name Description
    T

    Properties

    | Edit this page View Source

    Conditionless

    Whether the query is conditionless. A conditionless query is not serialized as part of the request sent to OpenSearch.

    Declaration
    protected override bool Conditionless { get; }
    Property Value
    Type Description
    bool
    Overrides
    QueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>.Conditionless

    Methods

    | Edit this page View Source

    Linear()

    Gives a score equal to the indexed value of S, where S is the value of the rank feature field.

    If a rank feature field is indexed with "positive_score_impact": true, its indexed value is equal to S and rounded to preserve only 9 significant bits for the precision.

    If a rank feature field is indexed with "positive_score_impact": false, its indexed value is equal to 1/S and rounded to preserve only 9 significant bits for the precision.

    Declaration
    public RankFeatureQueryDescriptor<T> Linear()
    Returns
    Type Description
    RankFeatureQueryDescriptor<T>
    | Edit this page View Source

    Logarithm(Func<RankFeatureLogarithmFunctionDescriptor, IRankFeatureLogarithmFunction>)

    Gives a score that is equal to log(scaling_factor + S) where S is the value of the rank feature and scaling_factor is a configurable scaling factor. Scores are unbounded. This function only supports rank features that have a positive score impact.

    Declaration
    public RankFeatureQueryDescriptor<T> Logarithm(Func<RankFeatureLogarithmFunctionDescriptor, IRankFeatureLogarithmFunction> selector)
    Parameters
    Type Name Description
    Func<RankFeatureLogarithmFunctionDescriptor, IRankFeatureLogarithmFunction> selector
    Returns
    Type Description
    RankFeatureQueryDescriptor<T>
    | Edit this page View Source

    Saturation(Func<RankFeatureSaturationFunctionDescriptor, IRankFeatureSaturationFunction>)

    Gives a score that is equal to S / (S + pivot) where S is the value of the rank feature and pivot is a configurable pivot value so that the result will be less than 0.5 if S is less than pivot and greater than 0.5 otherwise. Scores are always is (0, 1). If the rank feature has a negative score impact then the function will be computed as pivot / (S + pivot), which decreases when S increases.

    Declaration
    public RankFeatureQueryDescriptor<T> Saturation(Func<RankFeatureSaturationFunctionDescriptor, IRankFeatureSaturationFunction> selector = null)
    Parameters
    Type Name Description
    Func<RankFeatureSaturationFunctionDescriptor, IRankFeatureSaturationFunction> selector
    Returns
    Type Description
    RankFeatureQueryDescriptor<T>
    | Edit this page View Source

    Sigmoid(Func<RankFeatureSigmoidFunctionDescriptor, IRankFeatureSigmoidFunction>)

    is an extension of saturation which adds a configurable exponent. Scores are computed as S^exp^ / (S^exp^ + pivot^exp^). Like for the saturation function, pivot is the value of S that gives a score of 0.5 and scores are in (0, 1).

    exponent must be positive, but is typically in [0.5, 1]. A good value should be computed via training. If you don’t have the opportunity to do so, we recommend that you stick to the saturation function instead.

    Declaration
    public RankFeatureQueryDescriptor<T> Sigmoid(Func<RankFeatureSigmoidFunctionDescriptor, IRankFeatureSigmoidFunction> selector)
    Parameters
    Type Name Description
    Func<RankFeatureSigmoidFunctionDescriptor, IRankFeatureSigmoidFunction> selector
    Returns
    Type Description
    RankFeatureQueryDescriptor<T>

    Implements

    IDescriptor
    IRankFeatureQuery
    IFieldNameQuery
    IQuery

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • Conditionless
    • Methods
      • Linear()
      • Logarithm(Func<RankFeatureLogarithmFunctionDescriptor, IRankFeatureLogarithmFunction>)
      • Saturation(Func<RankFeatureSaturationFunctionDescriptor, IRankFeatureSaturationFunction>)
      • Sigmoid(Func<RankFeatureSigmoidFunctionDescriptor, IRankFeatureSigmoidFunction>)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX