Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GET index API always running all features #8392

Closed
wants to merge 1 commit into from
Closed

Fix GET index API always running all features #8392

wants to merge 1 commit into from

Conversation

colings86
Copy link
Contributor

Previous to this change all features (_alias,_mapping,_settings,_warmer) are run regardless of which features are actually requested. This change fixes the request object to resolve this bug

}
if (settings != null) {
this.settings = settings;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if we assign to null? wondering why these checks are needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be backwards compatible we need to return empty objects rather than null for features that return null from the request

@colings86
Copy link
Contributor Author

@javanna have pushed a new iteration. Let me know what you think

@@ -43,7 +111,15 @@ public GetIndexRequest features(String[] features) {
return this;
}

public String[] features() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave this method for java api bw comp

@javanna
Copy link
Member

javanna commented Nov 12, 2014

LGTM

Previous to this change all features (_alias,_mapping,_settings,_warmer) are run regardless of which features are actually requested. This change fixes the request object to resolve this bug
@colings86
Copy link
Contributor Author

merged into master, for 1.x and 1.4 changes see https://github.com/elasticsearch/elasticsearch/pull/8452/files

@colings86 colings86 closed this Nov 13, 2014
@colings86 colings86 deleted the fix/getIndexFeatures branch November 18, 2014 17:02
@clintongormley clintongormley added the :Data Management/Indices APIs APIs to create and manage indices and templates label Jun 7, 2015
@clintongormley clintongormley changed the title Indices API: Fix GET index API always running all features Fix GET index API always running all features Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants