Skip to content

Commit 4b24adc

Browse files
committed
Fix #3315 obsolete the update_all_types querystring parameter (#3368)
1 parent 15bf69a commit 4b24adc

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/CodeGeneration/ApiGenerator/Overrides/GlobalOverrides.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public class GlobalOverrides : EndpointOverridesBase
2828

2929
public override IDictionary<string, string> ObsoleteQueryStringParams { get; set; } = new Dictionary<string, string>
3030
{
31-
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."}
31+
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."},
32+
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"}
3233
};
3334

3435
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
@@ -1000,6 +1000,7 @@ public partial class CreateIndexRequestParameters : RequestParameters<CreateInde
10001000
///<summary>Specify timeout for connection to master</summary>
10011001
public TimeSpan MasterTimeout { get => Q<TimeSpan>("master_timeout"); set => Q("master_timeout", value); }
10021002
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1003+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
10031004
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
10041005
}
10051006
///<summary>Request options for IndicesDelete<pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html</pre></summary>
@@ -1312,6 +1313,7 @@ public partial class PutMappingRequestParameters : RequestParameters<PutMappingR
13121313
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
13131314
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
13141315
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1316+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
13151317
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
13161318
}
13171319
///<summary>Request options for IndicesPutSettingsForAll<pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html</pre></summary>

src/Nest/_Generated/_Descriptors.generated.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,7 @@ public CreateIndexDescriptor(IndexName index) : base(r=>r.Required("index", inde
16811681
///<summary>Specify timeout for connection to master</summary>
16821682
public CreateIndexDescriptor MasterTimeout(Time masterTimeout) => Qs("master_timeout", masterTimeout);
16831683
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1684+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
16841685
public CreateIndexDescriptor UpdateAllTypes(bool? updateAllTypes = true) => Qs("update_all_types", updateAllTypes);
16851686
}
16861687
///<summary>descriptor for IndicesDelete <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html</pre></summary>
@@ -2291,6 +2292,7 @@ public PutMappingDescriptor(TypeName type) : base(r=>r.Required("type", type)){}
22912292
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
22922293
public PutMappingDescriptor<T> ExpandWildcards(ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards);
22932294
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
2295+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
22942296
public PutMappingDescriptor<T> UpdateAllTypes(bool? updateAllTypes = true) => Qs("update_all_types", updateAllTypes);
22952297
}
22962298
///<summary>descriptor for IndicesPutSettingsForAll <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html</pre></summary>

src/Nest/_Generated/_Requests.generated.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,7 @@ public CreateIndexRequest(IndexName index) : base(r=>r.Required("index", index))
13511351
///<summary>Specify timeout for connection to master</summary>
13521352
public Time MasterTimeout { get => Q<Time>("master_timeout"); set => Q("master_timeout", value); }
13531353
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1354+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
13541355
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
13551356
}
13561357
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
@@ -4124,6 +4125,7 @@ public PutMappingRequest(TypeName type) : base(r=>r.Required("type", type)){}
41244125
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
41254126
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
41264127
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
4128+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
41274129
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
41284130
} ///<summary>Request parameters for IndicesPutMapping <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html</pre></summary>
41294131
public partial class PutMappingRequest : PlainRequestBase<PutMappingRequestParameters>, IPutMappingRequest
@@ -4155,6 +4157,7 @@ public PutMappingRequest(TypeName type) : base(r=>r.Required("type", type)){}
41554157
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
41564158
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
41574159
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
4160+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
41584161
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
41594162
}
41604163
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]

0 commit comments

Comments
 (0)