File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
core/src/main/java/org/elasticsearch/rest/action/admin/indices
rest-api-spec/src/main/resources/rest-api-spec/test/indices.get Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ public RestGetIndicesAction(
75
75
public RestChannelConsumer prepareRequest (final RestRequest request , final NodeClient client ) throws IOException {
76
76
String [] indices = Strings .splitStringByCommaToArray (request .param ("index" ));
77
77
String [] featureParams = request .paramAsStringArray ("type" , null );
78
+ if (featureParams != null && featureParams .length > 1 ) {
79
+ deprecationLogger .deprecated ("Requesting comma-separated features is deprecated and " +
80
+ "will be removed in 6.0+, retrieve all features instead." );
81
+ }
78
82
// Work out if the indices is a list of features
79
83
if (featureParams == null && indices .length > 0 && indices [0 ] != null && indices [0 ].startsWith ("_" ) && !"_all" .equals (indices [0 ])) {
80
84
featureParams = indices ;
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ all indices by using `_all` or `*` as index.
19
19
[float]
20
20
=== Filtering index information
21
21
22
+ deprecated[5.5.0, This comma-separated format is deprecated and will be removed. You can retrieve either a single feature (ie _alias) or all features]
23
+
22
24
The information returned by the get API can be filtered to include only specific features
23
25
by specifying a comma delimited list of features in the URL:
24
26
@@ -27,7 +29,7 @@ by specifying a comma delimited list of features in the URL:
27
29
GET twitter/_settings,_mappings
28
30
--------------------------------------------------
29
31
// CONSOLE
30
- // TEST[setup:twitter]
32
+ // TEST[setup:twitter warning:Requesting comma-separated features is deprecated and will be removed in 6.0+, retrieve all features instead. ]
31
33
32
34
The above command will only return the settings and mappings for the index called `twitter`.
33
35
Original file line number Diff line number Diff line change @@ -79,7 +79,13 @@ setup:
79
79
---
80
80
" Get index infos should work for wildcards " :
81
81
82
+ - skip :
83
+ features :
84
+ - warnings
85
+
82
86
- do :
87
+ warnings :
88
+ - ' Requesting comma-separated features is deprecated and will be removed in 6.0+, retrieve all features instead.'
83
89
indices.get :
84
90
index : test_*
85
91
feature : _mapping,_settings
You can’t perform that action at this time.
0 commit comments