Skip to content

Commit 81950a4

Browse files
Mpdreamzrusscam
authored andcommitted
obsolete copy_settings as of 6.4 (#3416)
It will no longer allow false and will be removed on the server in 8.x, and in the client in 7.x (cherry picked from commit 559367b)
1 parent 8af76c5 commit 81950a4

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

src/CodeGeneration/ApiGenerator/Overrides/GlobalOverrides.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public class GlobalOverrides : EndpointOverridesBase
3535
public override IDictionary<string, string> ObsoleteQueryStringParams { get; set; } = new Dictionary<string, string>
3636
{
3737
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."},
38-
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"}
38+
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"},
39+
{ "copy_settings", "Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404"}
3940
};
4041

4142
public override IEnumerable<string> SkipQueryStringParams { get; } = new[]

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,7 @@ public partial class ShrinkIndexRequestParameters : RequestParameters<ShrinkInde
14341434
{
14351435
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
14361436
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
1437+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
14371438
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
14381439
///<summary>Explicit operation timeout</summary>
14391440
public TimeSpan Timeout { get => Q<TimeSpan>("timeout"); set => Q("timeout", value); }
@@ -1447,6 +1448,7 @@ public partial class SplitIndexRequestParameters : RequestParameters<SplitIndexR
14471448
{
14481449
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
14491450
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
1451+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
14501452
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
14511453
///<summary>Explicit operation timeout</summary>
14521454
public TimeSpan Timeout { get => Q<TimeSpan>("timeout"); set => Q("timeout", value); }

src/Nest/_Generated/_Descriptors.generated.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,6 +2513,7 @@ public ShrinkIndexDescriptor(IndexName index, IndexName target) : base(r=>r.Requ
25132513
// Request parameters
25142514

25152515
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
2516+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
25162517
public ShrinkIndexDescriptor CopySettings(bool? copySettings = true) => Qs("copy_settings", copySettings);
25172518
///<summary>Explicit operation timeout</summary>
25182519
public ShrinkIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
@@ -2541,6 +2542,7 @@ public SplitIndexDescriptor(IndexName index, IndexName target) : base(r=>r.Requi
25412542
// Request parameters
25422543

25432544
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
2545+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
25442546
public SplitIndexDescriptor CopySettings(bool? copySettings = true) => Qs("copy_settings", copySettings);
25452547
///<summary>Explicit operation timeout</summary>
25462548
public SplitIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);

src/Nest/_Generated/_Requests.generated.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5550,6 +5550,7 @@ public ShrinkIndexRequest(IndexName index, IndexName target) : base(r=>r.Require
55505550

55515551
// Request parameters
55525552
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
5553+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
55535554
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
55545555
///<summary>Explicit operation timeout</summary>
55555556
public Time Timeout { get => Q<Time>("timeout"); set => Q("timeout", value); }
@@ -5881,6 +5882,7 @@ public SplitIndexRequest(IndexName index, IndexName target) : base(r=>r.Required
58815882

58825883
// Request parameters
58835884
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
5885+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
58845886
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
58855887
///<summary>Explicit operation timeout</summary>
58865888
public Time Timeout { get => Q<Time>("timeout"); set => Q("timeout", value); }

0 commit comments

Comments
 (0)