diff --git a/src/Nest/Aggregations/Bucket/DateHistogram/DateHistogramAggregation.cs b/src/Nest/Aggregations/Bucket/DateHistogram/DateHistogramAggregation.cs index aeaf95e5aa1..c3234f441da 100644 --- a/src/Nest/Aggregations/Bucket/DateHistogram/DateHistogramAggregation.cs +++ b/src/Nest/Aggregations/Bucket/DateHistogram/DateHistogramAggregation.cs @@ -19,9 +19,16 @@ public interface IDateHistogramAggregation : IBucketAggregation [DataMember(Name ="format")] string Format { get; set; } + [Obsolete("Deprecated in version 7.2.0, use CalendarInterval or FixedInterval instead")] [DataMember(Name ="interval")] Union Interval { get; set; } + [DataMember(Name ="calendar_interval")] + Union CalendarInterval { get; set; } + + [DataMember(Name ="fixed_interval")] + Union FixedInterval { get; set; } + [DataMember(Name ="min_doc_count")] int? MinimumDocumentCount { get; set; } @@ -65,7 +72,11 @@ public string Format set => _format = value; } + + [Obsolete("Deprecated in version 7.2.0, use CalendarInterval or FixedInterval instead")] public Union Interval { get; set; } + public Union CalendarInterval { get; set; } + public Union FixedInterval { get; set; } public int? MinimumDocumentCount { get; set; } public DateTime? Missing { get; set; } @@ -99,7 +110,10 @@ string IDateHistogramAggregation.Format set => _format = value; } + [Obsolete("Deprecated in version 7.2.0, use CalendarInterval or FixedInterval instead")] Union IDateHistogramAggregation.Interval { get; set; } + Union IDateHistogramAggregation.CalendarInterval { get; set; } + Union IDateHistogramAggregation.FixedInterval { get; set; } int? IDateHistogramAggregation.MinimumDocumentCount { get; set; } @@ -124,11 +138,18 @@ string IDateHistogramAggregation.Format public DateHistogramAggregationDescriptor Script(Func scriptSelector) => Assign(scriptSelector, (a, v) => a.Script = v?.Invoke(new ScriptDescriptor())); + [Obsolete("Deprecated in version 7.2.0, use CalendarInterval or FixedInterval instead")] public DateHistogramAggregationDescriptor Interval(Time interval) => Assign(interval, (a, v) => a.Interval = v); + [Obsolete("Deprecated in version 7.2.0, use CalendarInterval or FixedInterval instead")] public DateHistogramAggregationDescriptor Interval(DateInterval interval) => Assign(interval, (a, v) => a.Interval = v); + public DateHistogramAggregationDescriptor CalendarInterval(Time interval) => Assign(interval, (a, v) => a.CalendarInterval = v); + public DateHistogramAggregationDescriptor CalendarInterval(DateInterval interval) => Assign(interval, (a, v) => a.CalendarInterval = v); + public DateHistogramAggregationDescriptor FixedInterval(Time interval) => Assign(interval, (a, v) => a.FixedInterval = v); + public DateHistogramAggregationDescriptor FixedInterval(DateInterval interval) => Assign(interval, (a, v) => a.FixedInterval = v); + public DateHistogramAggregationDescriptor Format(string format) => Assign(format, (a, v) => a.Format = v); public DateHistogramAggregationDescriptor MinimumDocumentCount(int? minimumDocumentCount) => diff --git a/src/Tests/Tests.Reproduce/GithubIssue3673.cs b/src/Tests/Tests.Reproduce/GithubIssue3673.cs index 137175fe9b7..fe62f6e529c 100644 --- a/src/Tests/Tests.Reproduce/GithubIssue3673.cs +++ b/src/Tests/Tests.Reproduce/GithubIssue3673.cs @@ -16,6 +16,7 @@ public class GithubIssue3673 : IClusterFixture [I] public void DeserializeDateAggregation() { +#pragma warning disable 612, 618 Action action = () => _cluster.Client.Search(s => s .Size(0) .Aggregations(a => a @@ -27,6 +28,7 @@ public void DeserializeDateAggregation() ) ) ); +#pragma warning restore 612, 618 action.Should().NotThrow(); } diff --git a/src/Tests/Tests/Aggregations/Bucket/DateHistogram/DateHistogramAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Bucket/DateHistogram/DateHistogramAggregationUsageTests.cs index bd2f116977a..dd461687726 100644 --- a/src/Tests/Tests/Aggregations/Bucket/DateHistogram/DateHistogramAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Bucket/DateHistogram/DateHistogramAggregationUsageTests.cs @@ -64,6 +64,7 @@ public DateHistogramAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", date => date .Field(p => p.StartedOn) @@ -106,6 +107,7 @@ public DateHistogramAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage } } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { @@ -160,6 +162,7 @@ public DateHistogramAggregationNoSubAggregationsUsageTests(ReadOnlyCluster i, En } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", date => date .Field(p => p.StartedOn) @@ -186,6 +189,7 @@ public DateHistogramAggregationNoSubAggregationsUsageTests(ReadOnlyCluster i, En Order = HistogramOrder.CountAscending, Missing = FixedDate }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/AverageBucket/AverageBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/AverageBucket/AverageBucketAggregationUsageTests.cs index 9e44b854e99..ceb2eb3c061 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/AverageBucket/AverageBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/AverageBucket/AverageBucketAggregationUsageTests.cs @@ -42,6 +42,7 @@ public AverageBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -68,6 +69,7 @@ public AverageBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage { GapPolicy = GapPolicy.InsertZeros }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/BucketScript/BucketScriptAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/BucketScript/BucketScriptAggregationUsageTests.cs index 22d34c250e2..8218893723a 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/BucketScript/BucketScriptAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/BucketScript/BucketScriptAggregationUsageTests.cs @@ -72,6 +72,7 @@ public BucketScriptAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -125,6 +126,7 @@ public BucketScriptAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage Script = new InlineScript("params.stableCommits / params.totalCommits * 100") } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/BucketSelector/BucketSelectorAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/BucketSelector/BucketSelectorAggregationUsageTests.cs index dd188f2f929..c367f687dab 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/BucketSelector/BucketSelectorAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/BucketSelector/BucketSelectorAggregationUsageTests.cs @@ -48,6 +48,7 @@ public BucketSelectorAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsag } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -80,6 +81,7 @@ public BucketSelectorAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsag Script = new InlineScript("params.totalCommits >= 500") } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/BucketSort/BucketSortAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/BucketSort/BucketSortAggregationUsageTests.cs index 5e3afe069d3..25e8eb35ba9 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/BucketSort/BucketSortAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/BucketSort/BucketSortAggregationUsageTests.cs @@ -50,6 +50,7 @@ public BucketSortAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage us } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -87,6 +88,7 @@ public BucketSortAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage us GapPolicy = GapPolicy.InsertZeros } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/CumulativeSum/CumulativeSumAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/CumulativeSum/CumulativeSumAggregationUsageTests.cs index ffc1319435e..4ccaf154b7d 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/CumulativeSum/CumulativeSumAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/CumulativeSum/CumulativeSumAggregationUsageTests.cs @@ -41,6 +41,7 @@ public CumulativeSumAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -64,6 +65,7 @@ public CumulativeSumAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage new SumAggregation("commits", "numberOfCommits") && new CumulativeSumAggregation("cumulative_commits", "commits") }; +#pragma warning restore 618 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/Derivative/DerivativeAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/Derivative/DerivativeAggregationUsageTests.cs index 9b786722d1b..42f45cd2f7b 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/Derivative/DerivativeAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/Derivative/DerivativeAggregationUsageTests.cs @@ -42,6 +42,7 @@ public DerivativeAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage us } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -65,6 +66,7 @@ public DerivativeAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage us new SumAggregation("commits", "numberOfCommits") && new DerivativeAggregation("commits_derivative", "commits") }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/ExtendedStatsBucket/ExtendedStatsBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/ExtendedStatsBucket/ExtendedStatsBucketAggregationUsageTests.cs index 4179902c0c1..8ab0b74a444 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/ExtendedStatsBucket/ExtendedStatsBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/ExtendedStatsBucket/ExtendedStatsBucketAggregationUsageTests.cs @@ -42,6 +42,7 @@ public ExtendedStatsBucketAggregationUsageTests(ReadOnlyCluster cluster, Endpoin } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -68,6 +69,7 @@ public ExtendedStatsBucketAggregationUsageTests(ReadOnlyCluster cluster, Endpoin { Sigma = 2.0 }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MaxBucket/MaxBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MaxBucket/MaxBucketAggregationUsageTests.cs index 9a111347db7..9629228c57c 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MaxBucket/MaxBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MaxBucket/MaxBucketAggregationUsageTests.cs @@ -41,6 +41,7 @@ public MaxBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage usa } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -63,6 +64,7 @@ public MaxBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage usa Aggregations = new SumAggregation("commits", "numberOfCommits") } && new MaxBucketAggregation("max_commits_per_month", "projects_started_per_month>commits"); +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MinBucket/MinBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MinBucket/MinBucketAggregationUsageTests.cs index 715d9630c74..ec6edabc571 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MinBucket/MinBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MinBucket/MinBucketAggregationUsageTests.cs @@ -41,6 +41,7 @@ public MinBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage usa } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -63,6 +64,7 @@ public MinBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage usa Aggregations = new SumAggregation("commits", "numberOfCommits") } && new MinBucketAggregation("min_commits_per_month", "projects_started_per_month>commits"); +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageEwmaAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageEwmaAggregationUsageTests.cs index f70ef83cf3c..0784f88d2b1 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageEwmaAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageEwmaAggregationUsageTests.cs @@ -49,6 +49,7 @@ public MovingAverageEwmaAggregationUsageTests(ReadOnlyCluster cluster, EndpointU } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -83,6 +84,7 @@ public MovingAverageEwmaAggregationUsageTests(ReadOnlyCluster cluster, EndpointU } } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltLinearAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltLinearAggregationUsageTests.cs index faec2863dde..ed8c1c520ab 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltLinearAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltLinearAggregationUsageTests.cs @@ -50,6 +50,7 @@ public MovingAverageHoltLinearAggregationUsageTests(ReadOnlyCluster cluster, End } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -84,6 +85,7 @@ public MovingAverageHoltLinearAggregationUsageTests(ReadOnlyCluster cluster, End } } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltWintersAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltWintersAggregationUsageTests.cs index 3a6301c42f1..dd49ee1ee95 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltWintersAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageHoltWintersAggregationUsageTests.cs @@ -54,6 +54,7 @@ public MovingAverageHoltWintersUsageTests(ReadOnlyCluster cluster, EndpointUsage } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -100,6 +101,7 @@ public MovingAverageHoltWintersUsageTests(ReadOnlyCluster cluster, EndpointUsage } } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageLinearAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageLinearAggregationUsageTests.cs index 5161754c511..47aea331591 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageLinearAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageLinearAggregationUsageTests.cs @@ -47,6 +47,7 @@ public MovingAverageLinearAggregationUsageTests(ReadOnlyCluster cluster, Endpoin } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -78,6 +79,7 @@ public MovingAverageLinearAggregationUsageTests(ReadOnlyCluster cluster, Endpoin Model = new LinearModel() } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageSimpleAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageSimpleAggregationUsageTests.cs index 3462d9a6e95..2c9c91cd753 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageSimpleAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MovingAverage/MovingAverageSimpleAggregationUsageTests.cs @@ -48,6 +48,7 @@ public MovingAverageSimpleAggregationUsageTests(ReadOnlyCluster cluster, Endpoin } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -81,6 +82,7 @@ public MovingAverageSimpleAggregationUsageTests(ReadOnlyCluster cluster, Endpoin Model = new SimpleModel() } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/MovingFunction/MovingFunctionAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/MovingFunction/MovingFunctionAggregationUsageTests.cs index 887539567aa..ebb54d519ae 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/MovingFunction/MovingFunctionAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/MovingFunction/MovingFunctionAggregationUsageTests.cs @@ -57,6 +57,7 @@ public MovingFunctionAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsag } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -86,6 +87,7 @@ public MovingFunctionAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsag Script = "MovingFunctions.unweightedAvg(values)" } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/PercentilesBucket/PercentilesBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/PercentilesBucket/PercentilesBucketAggregationUsageTests.cs index 4f65a1ddaf3..2bec7065f23 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/PercentilesBucket/PercentilesBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/PercentilesBucket/PercentilesBucketAggregationUsageTests.cs @@ -42,6 +42,7 @@ public PercentilesBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointU } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -68,6 +69,7 @@ public PercentilesBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointU { Percents = new[] { 95, 99, 99.9 } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/SerialDifferencing/SerialDifferencingAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/SerialDifferencing/SerialDifferencingAggregationUsageTests.cs index 7c83e88830f..ea7e42c121c 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/SerialDifferencing/SerialDifferencingAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/SerialDifferencing/SerialDifferencingAggregationUsageTests.cs @@ -42,6 +42,7 @@ public SerialDifferencingAggregationUsageTests(ReadOnlyCluster cluster, Endpoint } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -69,6 +70,7 @@ public SerialDifferencingAggregationUsageTests(ReadOnlyCluster cluster, Endpoint Lag = 2 } }; +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/StatsBucket/StatsBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/StatsBucket/StatsBucketAggregationUsageTests.cs index 9e6faa989b3..46e9a596379 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/StatsBucket/StatsBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/StatsBucket/StatsBucketAggregationUsageTests.cs @@ -41,6 +41,7 @@ public StatsBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage u } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -63,6 +64,7 @@ public StatsBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage u Aggregations = new SumAggregation("commits", "numberOfCommits") } && new StatsBucketAggregation("stats_commits_per_month", "projects_started_per_month>commits"); +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/Aggregations/Pipeline/SumBucket/SumBucketAggregationUsageTests.cs b/src/Tests/Tests/Aggregations/Pipeline/SumBucket/SumBucketAggregationUsageTests.cs index a23d180c1d5..522cf2f9faa 100644 --- a/src/Tests/Tests/Aggregations/Pipeline/SumBucket/SumBucketAggregationUsageTests.cs +++ b/src/Tests/Tests/Aggregations/Pipeline/SumBucket/SumBucketAggregationUsageTests.cs @@ -41,6 +41,7 @@ public SumBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage usa } }; +#pragma warning disable 618, 612 protected override Func, IAggregationContainer> FluentAggs => a => a .DateHistogram("projects_started_per_month", dh => dh .Field(p => p.StartedOn) @@ -63,6 +64,7 @@ public SumBucketAggregationUsageTests(ReadOnlyCluster cluster, EndpointUsage usa Aggregations = new SumAggregation("commits", "numberOfCommits") } && new SumBucketAggregation("sum_of_commits", "projects_started_per_month>commits"); +#pragma warning restore 618, 612 protected override void ExpectResponse(ISearchResponse response) { diff --git a/src/Tests/Tests/CodeStandards/Descriptors.doc.cs b/src/Tests/Tests/CodeStandards/Descriptors.doc.cs index 78b5bd4598e..9cb652f572a 100644 --- a/src/Tests/Tests/CodeStandards/Descriptors.doc.cs +++ b/src/Tests/Tests/CodeStandards/Descriptors.doc.cs @@ -193,6 +193,8 @@ from m in d.GetMethods() //skips where !(new[] {"metric", "indexMetric", "watcherStatsMetric"}.Contains(p.Name)) where !(m.Name == "Interval" && d == typeof(DateHistogramAggregationDescriptor<>)) + where !(m.Name == "CalendarInterval" && d == typeof(DateHistogramAggregationDescriptor<>)) + where !(m.Name == "FixedInterval" && d == typeof(DateHistogramAggregationDescriptor<>)) where !(m.Name == "Lang" && dt == typeof(ScriptDescriptorBase<,>)) where !(m.Name == "Lang" && dt == typeof(StoredScriptDescriptor)) where !(m.Name == "Lang" && dt == typeof(ScriptQueryDescriptor<>))