@@ -40,6 +40,12 @@ public interface ISignificantTermsAggregator : IBucketAggregator
4040 [ JsonProperty ( "gnd" ) ]
4141 GoogleNormalizedDistanceHeuristic GoogleNormalizedDistance { get ; set ; }
4242
43+ [ JsonProperty ( "percentage" ) ]
44+ PercentageScoreHeuristic PercentageScore { get ; set ; }
45+
46+ [ JsonProperty ( "script_heuristic" ) ]
47+ ScriptedHeuristic Script { get ; set ; }
48+
4349 [ JsonProperty ( "background_filter" ) ]
4450 IFilterContainer BackgroundFilter { get ; set ; }
4551
@@ -57,6 +63,8 @@ public class SignificantTermsAggregator : BucketAggregator, ISignificantTermsAgg
5763 public MutualInformationHeuristic MutualInformation { get ; set ; }
5864 public ChiSquareHeuristic ChiSquare { get ; set ; }
5965 public GoogleNormalizedDistanceHeuristic GoogleNormalizedDistance { get ; set ; }
66+ public PercentageScoreHeuristic PercentageScore { get ; set ; }
67+ public ScriptedHeuristic Script { get ; set ; }
6068 public IFilterContainer BackgroundFilter { get ; set ; }
6169 }
6270
@@ -84,6 +92,10 @@ public class SignificantTermsAggregationDescriptor<T> : BucketAggregationBaseDes
8492
8593 GoogleNormalizedDistanceHeuristic ISignificantTermsAggregator . GoogleNormalizedDistance { get ; set ; }
8694
95+ PercentageScoreHeuristic ISignificantTermsAggregator . PercentageScore { get ; set ; }
96+
97+ ScriptedHeuristic ISignificantTermsAggregator . Script { get ; set ; }
98+
8799 IFilterContainer ISignificantTermsAggregator . BackgroundFilter { get ; set ; }
88100
89101 public SignificantTermsAggregationDescriptor < T > Field ( string field )
@@ -167,6 +179,18 @@ public SignificantTermsAggregationDescriptor<T> GoogleNormalizedDistance(bool? b
167179 return this ;
168180 }
169181
182+ public SignificantTermsAggregationDescriptor < T > PercentageScore ( )
183+ {
184+ this . Self . PercentageScore = new PercentageScoreHeuristic ( ) ;
185+ return this ;
186+ }
187+
188+ public SignificantTermsAggregationDescriptor < T > Script ( Func < ScriptedHeuristicDescriptor , ScriptedHeuristicDescriptor > scriptSelector )
189+ {
190+ this . Self . Script = scriptSelector ( new ScriptedHeuristicDescriptor ( ) ) . ScriptedHeuristic ;
191+ return this ;
192+ }
193+
170194 public SignificantTermsAggregationDescriptor < T > BackgroundFilter ( Func < FilterDescriptor < T > , FilterContainer > selector )
171195 {
172196 this . Self . BackgroundFilter = selector ( new FilterDescriptor < T > ( ) ) ;
0 commit comments