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(
7575 public RestChannelConsumer prepareRequest (final RestRequest request , final NodeClient client ) throws IOException {
7676 String [] indices = Strings .splitStringByCommaToArray (request .param ("index" ));
7777 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+ }
7882 // Work out if the indices is a list of features
7983 if (featureParams == null && indices .length > 0 && indices [0 ] != null && indices [0 ].startsWith ("_" ) && !"_all" .equals (indices [0 ])) {
8084 featureParams = indices ;
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ all indices by using `_all` or `*` as index.
1919[float]
2020=== Filtering index information
2121
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+
2224The information returned by the get API can be filtered to include only specific features
2325by specifying a comma delimited list of features in the URL:
2426
@@ -27,7 +29,7 @@ by specifying a comma delimited list of features in the URL:
2729GET twitter/_settings,_mappings
2830--------------------------------------------------
2931// 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. ]
3133
3234The above command will only return the settings and mappings for the index called `twitter`.
3335
Original file line number Diff line number Diff line change @@ -79,7 +79,13 @@ setup:
7979---
8080" Get index infos should work for wildcards " :
8181
82+ - skip :
83+ features :
84+ - warnings
85+
8286 - do :
87+ warnings :
88+ - ' Requesting comma-separated features is deprecated and will be removed in 6.0+, retrieve all features instead.'
8389 indices.get :
8490 index : test_*
8591 feature : _mapping,_settings
You can’t perform that action at this time.
0 commit comments