@@ -40,6 +40,9 @@ public interface ISignificantTermsAggregator : IBucketAggregator
40
40
[ JsonProperty ( "gnd" ) ]
41
41
GoogleNormalizedDistanceHeuristic GoogleNormalizedDistance { get ; set ; }
42
42
43
+ [ JsonProperty ( "background_filter" ) ]
44
+ IFilterContainer BackgroundFilter { get ; set ; }
45
+
43
46
}
44
47
45
48
public class SignificantTermsAggregator : BucketAggregator , ISignificantTermsAggregator
@@ -54,6 +57,7 @@ public class SignificantTermsAggregator : BucketAggregator, ISignificantTermsAgg
54
57
public MutualInformationHeuristic MutualInformation { get ; set ; }
55
58
public ChiSquareHeuristic ChiSquare { get ; set ; }
56
59
public GoogleNormalizedDistanceHeuristic GoogleNormalizedDistance { get ; set ; }
60
+ public IFilterContainer BackgroundFilter { get ; set ; }
57
61
}
58
62
59
63
public class SignificantTermsAggregationDescriptor < T > : BucketAggregationBaseDescriptor < SignificantTermsAggregationDescriptor < T > , T > , ISignificantTermsAggregator where T : class
@@ -80,6 +84,8 @@ public class SignificantTermsAggregationDescriptor<T> : BucketAggregationBaseDes
80
84
81
85
GoogleNormalizedDistanceHeuristic ISignificantTermsAggregator . GoogleNormalizedDistance { get ; set ; }
82
86
87
+ IFilterContainer ISignificantTermsAggregator . BackgroundFilter { get ; set ; }
88
+
83
89
public SignificantTermsAggregationDescriptor < T > Field ( string field )
84
90
{
85
91
Self . Field = field ;
@@ -161,5 +167,10 @@ public SignificantTermsAggregationDescriptor<T> GoogleNormalizedDistance(bool? b
161
167
return this ;
162
168
}
163
169
170
+ public SignificantTermsAggregationDescriptor < T > BackgroundFilter ( Func < FilterDescriptor < T > , FilterContainer > selector )
171
+ {
172
+ this . Self . BackgroundFilter = selector ( new FilterDescriptor < T > ( ) ) ;
173
+ return this ;
174
+ }
164
175
}
165
176
}
0 commit comments