@@ -35,7 +35,16 @@ public interface ISignificantTermsAggregation : IBucketAggregation
35
35
/// number of hits
36
36
/// </summary>
37
37
[ 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 ; }
39
48
40
49
/// <summary>
41
50
/// Determines the mechanism by which aggregations are executed
@@ -97,7 +106,6 @@ public interface ISignificantTermsAggregation : IBucketAggregation
97
106
/// </summary>
98
107
[ JsonProperty ( "background_filter" ) ]
99
108
QueryContainer BackgroundFilter { get ; set ; }
100
-
101
109
}
102
110
103
111
public class SignificantTermsAggregation : BucketAggregationBase , ISignificantTermsAggregation
@@ -109,13 +117,13 @@ public class SignificantTermsAggregation : BucketAggregationBase, ISignificantTe
109
117
/// <inheritdoc />
110
118
public int ? ShardSize { get ; set ; }
111
119
/// <inheritdoc />
112
- public int ? MinimumDocumentCount { get ; set ; }
120
+ public long ? MinimumDocumentCount { get ; set ; }
121
+ /// <inheritdoc />
122
+ public long ? ShardMinimumDocumentCount { get ; set ; }
113
123
/// <inheritdoc />
114
124
public TermsAggregationExecutionHint ? ExecutionHint { get ; set ; }
115
-
116
125
/// <inheritdoc />
117
126
public SignificantTermsIncludeExclude Include { get ; set ; }
118
-
119
127
/// <inheritdoc />
120
128
public SignificantTermsIncludeExclude Exclude { get ; set ; }
121
129
/// <inheritdoc />
@@ -149,7 +157,9 @@ public class SignificantTermsAggregationDescriptor<T>
149
157
150
158
int ? ISignificantTermsAggregation . ShardSize { get ; set ; }
151
159
152
- int ? ISignificantTermsAggregation . MinimumDocumentCount { get ; set ; }
160
+ long ? ISignificantTermsAggregation . MinimumDocumentCount { get ; set ; }
161
+
162
+ long ? ISignificantTermsAggregation . ShardMinimumDocumentCount { get ; set ; }
153
163
154
164
TermsAggregationExecutionHint ? ISignificantTermsAggregation . ExecutionHint { get ; set ; }
155
165
@@ -201,9 +211,13 @@ public SignificantTermsAggregationDescriptor<T> Exclude(IEnumerable<string> valu
201
211
public SignificantTermsAggregationDescriptor < T > ShardSize ( int shardSize ) => Assign ( a => a . ShardSize = shardSize ) ;
202
212
203
213
/// <inheritdoc />
204
- public SignificantTermsAggregationDescriptor < T > MinimumDocumentCount ( int minimumDocumentCount ) =>
214
+ public SignificantTermsAggregationDescriptor < T > MinimumDocumentCount ( long minimumDocumentCount ) =>
205
215
Assign ( a => a . MinimumDocumentCount = minimumDocumentCount ) ;
206
216
217
+ /// <inheritdoc />
218
+ public SignificantTermsAggregationDescriptor < T > ShardMinimumDocumentCount ( long shardMinimumDocumentCount ) =>
219
+ Assign ( a => a . ShardMinimumDocumentCount = shardMinimumDocumentCount ) ;
220
+
207
221
/// <inheritdoc />
208
222
public SignificantTermsAggregationDescriptor < T > MutualInformation ( Func < MutualInformationHeuristicDescriptor , IMutualInformationHeuristic > mutualInformationSelector = null ) =>
209
223
Assign ( a => a . MutualInformation = mutualInformationSelector . InvokeOrDefault ( new MutualInformationHeuristicDescriptor ( ) ) ) ;
0 commit comments