@@ -16,16 +16,16 @@ public interface IFiltersAggregation : IBucketAggregation
16
16
bool ? OtherBucket { get ; set ; }
17
17
18
18
[ JsonProperty ( "other_bucket_key" ) ]
19
- string OtherBucketKey { get ; set ; }
19
+ string OtherBucketKey { get ; set ; }
20
20
}
21
21
22
22
public class FiltersAggregation : BucketAggregationBase , IFiltersAggregation
23
23
{
24
24
public Union < INamedFiltersContainer , List < QueryContainer > > Filters { get ; set ; }
25
25
26
26
/// <summary>
27
- /// Gets or sets whether to add a bucket to the response which will contain all documents
28
- /// that do not match any of the given filters.
27
+ /// Gets or sets whether to add a bucket to the response which will contain all documents
28
+ /// that do not match any of the given filters.
29
29
/// When set to <c>true</c>, the other bucket will be returned either in a bucket
30
30
/// (named "_other_" by default) if named filters are being used,
31
31
/// or as the last bucket if anonymous filters are being used
@@ -35,7 +35,7 @@ public class FiltersAggregation : BucketAggregationBase, IFiltersAggregation
35
35
public bool ? OtherBucket { get ; set ; }
36
36
37
37
/// <summary>
38
- /// Gets or sets the key for the other bucket to a value other than the default "_other_".
38
+ /// Gets or sets the key for the other bucket to a value other than the default "_other_".
39
39
/// Setting this parameter will implicitly set the <see cref="OtherBucket"/> parameter to true
40
40
/// </summary>
41
41
public string OtherBucketKey { get ; set ; }
@@ -47,7 +47,7 @@ public FiltersAggregation(string name) : base(name) { }
47
47
internal override void WrapInContainer ( AggregationContainer c ) => c . Filters = this ;
48
48
}
49
49
50
- public class FiltersAggregationDescriptor < T >
50
+ public class FiltersAggregationDescriptor < T >
51
51
: BucketAggregationDescriptorBase < FiltersAggregationDescriptor < T > , IFiltersAggregation , T >
52
52
, IFiltersAggregation
53
53
where T : class
@@ -59,21 +59,21 @@ public class FiltersAggregationDescriptor<T>
59
59
string IFiltersAggregation . OtherBucketKey { get ; set ; }
60
60
61
61
/// <summary>
62
- /// Adds a bucket to the response which will contain all documents
63
- /// that do not match any of the given filters.
62
+ /// Adds a bucket to the response which will contain all documents
63
+ /// that do not match any of the given filters.
64
64
/// When set to <c>true</c>, the other bucket will be returned either in a bucket
65
65
/// (named "_other_" by default) if named filters are being used,
66
66
/// or as the last bucket if anonymous filters are being used
67
67
/// When set to <c>false</c>, does not compute
68
- /// the other bucket.
68
+ /// the other bucket.
69
69
/// </summary>
70
70
/// <param name="otherBucket">whether to set the other bucket</param>
71
71
/// <returns>the <see cref="FiltersAggregationDescriptor{T}"/></returns>
72
72
public FiltersAggregationDescriptor < T > OtherBucket ( bool otherBucket = true ) =>
73
73
Assign ( a => a . OtherBucket = otherBucket ) ;
74
74
75
75
/// <summary>
76
- /// Sets the key for the other bucket to a value other than the default "_other_".
76
+ /// Sets the key for the other bucket to a value other than the default "_other_".
77
77
/// Setting this parameter will implicitly set the <see cref="OtherBucket"/> parameter to true
78
78
/// </summary>
79
79
/// <param name="otherBucketKey">the name for the other bucket</param>
@@ -85,10 +85,10 @@ public FiltersAggregationDescriptor<T> NamedFilters(Func<NamedFiltersContainerDe
85
85
Assign ( a => a . Filters = new Union < INamedFiltersContainer , List < QueryContainer > > ( selector ? . Invoke ( new NamedFiltersContainerDescriptor < T > ( ) ) ? . Value ) ) ;
86
86
87
87
public FiltersAggregationDescriptor < T > AnonymousFilters ( params Func < QueryContainerDescriptor < T > , QueryContainer > [ ] selectors ) =>
88
- Assign ( a => a . Filters = selectors . Select ( s=> s ? . InvokeQuery ( new QueryContainerDescriptor < T > ( ) ) ) . ToList ( ) ) ;
88
+ Assign ( a => a . Filters = selectors . Select ( s=> s ? . Invoke ( new QueryContainerDescriptor < T > ( ) ) ) . ToList ( ) ) ;
89
89
90
90
public FiltersAggregationDescriptor < T > AnonymousFilters ( IEnumerable < Func < QueryContainerDescriptor < T > , QueryContainer > > selectors ) =>
91
- Assign ( a => a . Filters = selectors . Select ( s=> s ? . InvokeQuery ( new QueryContainerDescriptor < T > ( ) ) ) . ToList ( ) ) ;
91
+ Assign ( a => a . Filters = selectors . Select ( s=> s ? . Invoke ( new QueryContainerDescriptor < T > ( ) ) ) . ToList ( ) ) ;
92
92
93
93
}
94
- }
94
+ }
0 commit comments