Class RankFeatureQueryDescriptor<T>
Inheritance
RankFeatureQueryDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class RankFeatureQueryDescriptor<T> : FieldNameQueryDescriptorBase<RankFeatureQueryDescriptor<T>, IRankFeatureQuery, T>, IDescriptor, IRankFeatureQuery, IFieldNameQuery, IQuery where T : class
Type Parameters
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
Overrides
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
|
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
Returns
|
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
Returns
|
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
Returns
Implements
Extension Methods