@@ -16,13 +16,18 @@ public interface IMetricAggregator
16
16
17
17
[ JsonProperty ( "params" ) ]
18
18
IDictionary < string , object > Params { get ; set ; }
19
+
20
+ [ JsonProperty ( PropertyName = "lang" ) ]
21
+ string Language { get ; set ; }
22
+
19
23
}
20
24
21
25
public abstract class MetricAggregator : IMetricAggregator
22
26
{
23
27
public PropertyPathMarker Field { get ; set ; }
24
28
public string Script { get ; set ; }
25
29
public IDictionary < string , object > Params { get ; set ; }
30
+ public string Language { get ; set ; }
26
31
}
27
32
28
33
public abstract class MetricAggregationBaseDescriptor < TMetricAggregation , T > : IAggregationDescriptor , IMetricAggregator
@@ -37,6 +42,8 @@ public abstract class MetricAggregationBaseDescriptor<TMetricAggregation, T> : I
37
42
38
43
IDictionary < string , object > IMetricAggregator . Params { get ; set ; }
39
44
45
+ string IMetricAggregator . Language { get ; set ; }
46
+
40
47
public TMetricAggregation Field ( string field )
41
48
{
42
49
Self . Field = field ;
@@ -60,5 +67,12 @@ public TMetricAggregation Params(Func<FluentDictionary<string, object>, FluentDi
60
67
Self . Params = paramSelector ( new FluentDictionary < string , object > ( ) ) ;
61
68
return ( TMetricAggregation ) this ;
62
69
}
70
+
71
+ public TMetricAggregation Language ( string language )
72
+ {
73
+ Self . Language = language ;
74
+ return ( TMetricAggregation ) this ;
75
+ }
76
+
63
77
}
64
78
}
0 commit comments