Class WeightedAverageValueDescriptor<T>
Inheritance
WeightedAverageValueDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class WeightedAverageValueDescriptor<T> : DescriptorBase<WeightedAverageValueDescriptor<T>, IWeightedAverageValue>, IDescriptor, IWeightedAverageValue where T : class
Type Parameters
Methods
|
Edit this page
View Source
Field(Field)
The field that values should be extracted from
Declaration
public WeightedAverageValueDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
The field that values should be extracted from
Declaration
public WeightedAverageValueDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> field)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Missing(double?)
defines how documents that are missing a value should be treated.
The default behavior is different for value and weight:
By default, if the value field is missing the document is ignored and the aggregation
moves on to the next document.
If the weight field is missing, it is assumed to have a weight of 1 (like a normal average).
Declaration
public WeightedAverageValueDescriptor<T> Missing(double? missing)
Parameters
Type |
Name |
Description |
double? |
missing |
|
Returns
|
Edit this page
View Source
Script(Func<ScriptDescriptor, IScript>)
A script to derive the value and the weight from
Declaration
public virtual WeightedAverageValueDescriptor<T> Script(Func<ScriptDescriptor, IScript> scriptSelector)
Parameters
Returns
|
Edit this page
View Source
Script(string)
A script to derive the value and the weight from
Declaration
public virtual WeightedAverageValueDescriptor<T> Script(string script)
Parameters
Type |
Name |
Description |
string |
script |
|
Returns
Implements
Extension Methods