Skip to content

Commit b88ce29

Browse files
author
Stuart Cam
authored
Add BWC changes to client for 6.2 release. (#3306)
* Add BWC changes to `6.2` release
1 parent 4a7ab56 commit b88ce29

File tree

7 files changed

+253
-389
lines changed

7 files changed

+253
-389
lines changed

src/CodeGeneration/ApiGenerator/Views/RequestParameters.Generated.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Elasticsearch.Net
1919
{
2020
<text>
2121
///<summary>Request options for @method.FullName<pre>@method.Documentation</pre></summary>
22-
public class @method.QueryStringParamName : RequestParameters<@method.QueryStringParamName>
22+
public partial class @method.QueryStringParamName : RequestParameters<@method.QueryStringParamName>
2323
{
2424
public override HttpMethod DefaultHttpMethod => HttpMethod.@method.HttpMethod;
2525
@foreach (var param in method.Url.Params.Values)

src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs

Lines changed: 190 additions & 378 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
3+
namespace Elasticsearch.Net
4+
{
5+
public partial class ForceMergeRequestParameters
6+
{
7+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
8+
public string OperationThreading { get; set; }
9+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
10+
public bool? WaitForMerge { get; set; }
11+
}
12+
13+
public partial class SegmentsRequestParameters
14+
{
15+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
16+
public string OperationThreading { get; set; }
17+
}
18+
19+
public partial class IndicesShardStoresRequestParameters
20+
{
21+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
22+
public string OperationThreading { get; set; }
23+
}
24+
25+
public partial class ValidateQueryRequestParameters
26+
{
27+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
28+
public string OperationThreading { get; set; }
29+
}
30+
}
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
namespace Nest
1+
using System;
2+
3+
namespace Nest
24
{
35
public partial interface ISegmentsRequest { }
46

57
public partial class SegmentsRequest { }
6-
8+
79
[DescriptorFor("IndicesSegments")]
8-
public partial class SegmentsDescriptor { }
10+
public partial class SegmentsDescriptor
11+
{
12+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
13+
public SegmentsDescriptor OperationThreading(string operationThreading) => this;
14+
}
915
}

src/Nest/Indices/Monitoring/IndicesShardStores/IndicesShardStoresRequest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23

34
namespace Nest
45
{
@@ -39,5 +40,7 @@ IEnumerable<TypeName> IIndicesShardStoresRequest.Types
3940
public IndicesShardStoresDescriptor Types(params TypeName[] types) =>
4041
Assign(a => a.Types = types);
4142

43+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
44+
public IndicesShardStoresDescriptor OperationThreading(string operationThreading) => this;
4245
}
4346
}
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
namespace Nest
1+
using System;
2+
3+
namespace Nest
24
{
35
public partial interface IForceMergeRequest { }
46

57
public partial class ForceMergeRequest { }
68

79
[DescriptorFor("IndicesForcemerge")]
8-
public partial class ForceMergeDescriptor { }
10+
public partial class ForceMergeDescriptor
11+
{
12+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
13+
public ForceMergeDescriptor OperationThreading(string operationThreading) => this;
14+
15+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
16+
public ForceMergeDescriptor WaitForMerge(bool? waitForMerge = true) => this;
17+
}
918
}

src/Nest/Search/Validate/ValidateQueryRequest.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Nest
55
{
6-
public partial interface IValidateQueryRequest
6+
public partial interface IValidateQueryRequest
77
{
88
[JsonProperty("query")]
99
QueryContainer Query { get; set; }
@@ -14,12 +14,12 @@ public interface IValidateQueryRequest<T> : IValidateQueryRequest
1414
where T : class
1515
{ }
1616

17-
public partial class ValidateQueryRequest
17+
public partial class ValidateQueryRequest
1818
{
1919
public QueryContainer Query { get; set; }
2020
}
2121

22-
public partial class ValidateQueryRequest<T>
22+
public partial class ValidateQueryRequest<T>
2323
where T : class
2424
{
2525
public QueryContainer Query { get; set; }
@@ -30,6 +30,10 @@ public partial class ValidateQueryDescriptor<T> where T : class
3030
{
3131
QueryContainer IValidateQueryRequest.Query { get; set; }
3232

33-
public ValidateQueryDescriptor<T> Query(Func<QueryContainerDescriptor<T>, QueryContainer> querySelector) => Assign(a => a.Query = querySelector?.Invoke(new QueryContainerDescriptor<T>()));
33+
public ValidateQueryDescriptor<T> Query(Func<QueryContainerDescriptor<T>, QueryContainer> querySelector)
34+
=> Assign(a => a.Query = querySelector?.Invoke(new QueryContainerDescriptor<T>()));
35+
36+
[Obsolete("Removed in Elasticsearch 6.2. Will be removed in NEST 7.x. Calling this is a no-op.")]
37+
public ValidateQueryDescriptor<T> OperationThreading(string operationThreading) => this;
3438
}
3539
}

0 commit comments

Comments
 (0)