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

Allows all options for expand_wildcards parameter #7290

Merged
merged 1 commit into from Aug 15, 2014

Conversation

Projects
None yet
4 participants
@colings86
Copy link
Member

commented Aug 15, 2014

This change means that the default settings for expand_wildcards are only applied if the expand_wildcards parameter is not specified rather than being set upfront. It also adds the none and all options to the parameter to allow the user to specify no expansion and expansion to all indexes (equivalent to 'open,closed')

Closes #7258

@colings86 colings86 added the review label Aug 15, 2014

@javanna

This comment has been minimized.

Copy link
Member

commented Aug 15, 2014

LGTM, can you please check that we have tests for these two cases, I'm afraid we've only used either open or open and closed in your current tests.

@javanna javanna removed the review label Aug 15, 2014

@colings86

This comment has been minimized.

Copy link
Member Author

commented Aug 15, 2014

@javanna I added a set of REST tests for the get mapping API which test the options from the rest layer and also added tests to MetaDataTests to test the functionality on the Java layer

@colings86 colings86 added the review label Aug 15, 2014

@colings86 colings86 self-assigned this Aug 15, 2014

@javanna

View changes

src/test/java/org/elasticsearch/cluster/metadata/MetaDataTests.java Outdated
@@ -545,6 +564,35 @@ public void concreteIndicesIgnoreIndicesEmptyRequest() {
assertThat(newHashSet(md.concreteIndices(IndicesOptions.lenientExpandOpen(), new String[]{})), equalTo(Sets.newHashSet("kuku", "testXXX")));
}

public void concreteIndicesWildcardExpansion() {

This comment has been minimized.

Copy link
@javanna

javanna Aug 15, 2014

Member

missing @test annotation, I think if the method name doesn't start with test it won't be picked up

@javanna

View changes

src/test/java/org/elasticsearch/cluster/metadata/MetaDataTests.java Outdated
assertThat(newHashSet(md.concreteIndices(IndicesOptions.fromOptions(true, true, true, true), "testX*")), equalTo(newHashSet("testXXX", "testXXY", "testXYY")));
}

public void concreteIndicesWildcardExpansionIndexMatchesExpression() {

This comment has been minimized.

Copy link
@javanna

javanna Aug 15, 2014

Member

Same as above

@javanna

This comment has been minimized.

Copy link
Member

commented Aug 15, 2014

Left a small comment, other than that looks great

@javanna javanna removed the review label Aug 15, 2014

REST API: Allows all options for expand_wildcards parameter
This change means that the default settings for expand_wildcards are only applied if the expand_wildcards parameter is not specified rather than being set upfront. It also adds the none and all options to the parameter to allow the user to specify no expansion and expansion to all indexes (equivalent to 'open,closed')

Closes #7258

@colings86 colings86 merged commit f4d75f0 into elastic:master Aug 15, 2014

@colings86 colings86 deleted the colings86:fix/7258 branch Aug 15, 2014

@jpountz jpountz removed the review label Aug 18, 2014

@colings86 colings86 assigned colings86 and unassigned colings86 Aug 21, 2014

@clintongormley clintongormley changed the title REST API: Allows all options for expand_wildcards parameter Allows all options for expand_wildcards parameter Jun 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.