Skip to content

Commit 941e16e

Browse files
committed
Fix #3315 obsolete the update_all_types querystring parameter (#3368)
(cherry picked from commit 4250901)
1 parent f3a5ef1 commit 941e16e

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
@@ -1045,6 +1045,7 @@ public class CreateIndexRequestParameters : RequestParameters<CreateIndexRequest
10451045
///<summary>Specify timeout for connection to master</summary>
10461046
public TimeSpan MasterTimeout { get => Q<TimeSpan>("master_timeout"); set => Q("master_timeout", value); }
10471047
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1048+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
10481049
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
10491050
}
10501051

@@ -1377,6 +1378,7 @@ public class PutMappingRequestParameters : RequestParameters<PutMappingRequestPa
13771378
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
13781379
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
13791380
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1381+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
13801382
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
13811383
}
13821384

src/Nest/_Generated/_Descriptors.generated.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,7 @@ public CreateIndexDescriptor(IndexName index) : base(r=>r.Required("index", inde
16551655
///<summary>Specify timeout for connection to master</summary>
16561656
public CreateIndexDescriptor MasterTimeout(Time masterTimeout) => Qs("master_timeout", masterTimeout);
16571657
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1658+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
16581659
public CreateIndexDescriptor UpdateAllTypes(bool? updateAllTypes = true) => Qs("update_all_types", updateAllTypes);
16591660

16601661
}
@@ -2240,6 +2241,7 @@ public PutMappingDescriptor(TypeName type) : base(r=>r.Required("type", type)){}
22402241
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
22412242
public PutMappingDescriptor<T> ExpandWildcards(ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards);
22422243
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
2244+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
22432245
public PutMappingDescriptor<T> UpdateAllTypes(bool? updateAllTypes = true) => Qs("update_all_types", updateAllTypes);
22442246

22452247
}

src/Nest/_Generated/_Requests.generated.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,7 @@ public CreateIndexRequest(IndexName index) : base(r=>r.Required("index", index))
14981498
///<summary>Specify timeout for connection to master</summary>
14991499
public Time MasterTimeout { get => Q<Time>("master_timeout"); set => Q("master_timeout", value); }
15001500
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
1501+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
15011502
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
15021503
}
15031504

@@ -4607,6 +4608,7 @@ public PutMappingRequest(TypeName type) : base(r=>r.Required("type", type)){}
46074608
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
46084609
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
46094610
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
4611+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
46104612
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
46114613
}
46124614
///<summary>Request parameters for IndicesPutMapping <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html</pre></summary>
@@ -4641,6 +4643,7 @@ public PutMappingRequest(TypeName type) : base(r=>r.Required("type", type)){}
46414643
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
46424644
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
46434645
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
4646+
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
46444647
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
46454648
}
46464649

0 commit comments

Comments
 (0)