Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public RestGetIndicesAction(
public RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {
String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
String[] featureParams = request.paramAsStringArray("type", null);
if (featureParams != null && featureParams.length > 1) {
deprecationLogger.deprecated("Requesting comma-separated features is deprecated and " +
"will be removed in 6.0+, retrieve all features instead.");
}
// Work out if the indices is a list of features
if (featureParams == null && indices.length > 0 && indices[0] != null && indices[0].startsWith("_") && !"_all".equals(indices[0])) {
featureParams = indices;
Expand Down
4 changes: 3 additions & 1 deletion docs/reference/indices/get-index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ all indices by using `_all` or `*` as index.
[float]
=== Filtering index information

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]

The information returned by the get API can be filtered to include only specific features
by specifying a comma delimited list of features in the URL:

Expand All @@ -27,7 +29,7 @@ by specifying a comma delimited list of features in the URL:
GET twitter/_settings,_mappings
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
// TEST[setup:twitter warning:Requesting comma-separated features is deprecated and will be removed in 6.0+, retrieve all features instead.]

The above command will only return the settings and mappings for the index called `twitter`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ setup:
---
"Get index infos should work for wildcards":

- skip:
features:
- warnings

- do:
warnings:
- 'Requesting comma-separated features is deprecated and will be removed in 6.0+, retrieve all features instead.'
indices.get:
index: test_*
feature: _mapping,_settings
Expand Down