@@ -35,7 +35,16 @@ public interface ISignificantTermsAggregation : IBucketAggregation
3535 /// number of hits
3636 /// </summary>
3737 [ JsonProperty ( "min_doc_count" ) ]
38- int ? MinimumDocumentCount { get ; set ; }
38+ long ? MinimumDocumentCount { get ; set ; }
39+
40+ /// <summary>
41+ /// Regulates the certainty a shard has if the term should actually be added to the candidate
42+ /// list or not with respect to the <see cref="MinimumDocumentCount"/>.
43+ /// Terms will only be considered if their local shard frequency within
44+ /// the set is higher than the <see cref="ShardMinimumDocumentCount"/>.
45+ /// </summary>
46+ [ JsonProperty ( "shard_min_doc_count" ) ]
47+ long ? ShardMinimumDocumentCount { get ; set ; }
3948
4049 /// <summary>
4150 /// Determines the mechanism by which aggregations are executed
@@ -97,7 +106,6 @@ public interface ISignificantTermsAggregation : IBucketAggregation
97106 /// </summary>
98107 [ JsonProperty ( "background_filter" ) ]
99108 QueryContainer BackgroundFilter { get ; set ; }
100-
101109 }
102110
103111 public class SignificantTermsAggregation : BucketAggregationBase , ISignificantTermsAggregation
@@ -109,13 +117,13 @@ public class SignificantTermsAggregation : BucketAggregationBase, ISignificantTe
109117 /// <inheritdoc />
110118 public int ? ShardSize { get ; set ; }
111119 /// <inheritdoc />
112- public int ? MinimumDocumentCount { get ; set ; }
120+ public long ? MinimumDocumentCount { get ; set ; }
121+ /// <inheritdoc />
122+ public long ? ShardMinimumDocumentCount { get ; set ; }
113123 /// <inheritdoc />
114124 public TermsAggregationExecutionHint ? ExecutionHint { get ; set ; }
115-
116125 /// <inheritdoc />
117126 public SignificantTermsIncludeExclude Include { get ; set ; }
118-
119127 /// <inheritdoc />
120128 public SignificantTermsIncludeExclude Exclude { get ; set ; }
121129 /// <inheritdoc />
@@ -149,7 +157,9 @@ public class SignificantTermsAggregationDescriptor<T>
149157
150158 int ? ISignificantTermsAggregation . ShardSize { get ; set ; }
151159
152- int ? ISignificantTermsAggregation . MinimumDocumentCount { get ; set ; }
160+ long ? ISignificantTermsAggregation . MinimumDocumentCount { get ; set ; }
161+
162+ long ? ISignificantTermsAggregation . ShardMinimumDocumentCount { get ; set ; }
153163
154164 TermsAggregationExecutionHint ? ISignificantTermsAggregation . ExecutionHint { get ; set ; }
155165
@@ -201,9 +211,13 @@ public SignificantTermsAggregationDescriptor<T> Exclude(IEnumerable<string> valu
201211 public SignificantTermsAggregationDescriptor < T > ShardSize ( int shardSize ) => Assign ( a => a . ShardSize = shardSize ) ;
202212
203213 /// <inheritdoc />
204- public SignificantTermsAggregationDescriptor < T > MinimumDocumentCount ( int minimumDocumentCount ) =>
214+ public SignificantTermsAggregationDescriptor < T > MinimumDocumentCount ( long minimumDocumentCount ) =>
205215 Assign ( a => a . MinimumDocumentCount = minimumDocumentCount ) ;
206216
217+ /// <inheritdoc />
218+ public SignificantTermsAggregationDescriptor < T > ShardMinimumDocumentCount ( long shardMinimumDocumentCount ) =>
219+ Assign ( a => a . ShardMinimumDocumentCount = shardMinimumDocumentCount ) ;
220+
207221 /// <inheritdoc />
208222 public SignificantTermsAggregationDescriptor < T > MutualInformation ( Func < MutualInformationHeuristicDescriptor , IMutualInformationHeuristic > mutualInformationSelector = null ) =>
209223 Assign ( a => a . MutualInformation = mutualInformationSelector . InvokeOrDefault ( new MutualInformationHeuristicDescriptor ( ) ) ) ;
0 commit comments