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

REST API: Cannot expand_wildcards for only closed indices #7258

Closed
colings86 opened this Issue Aug 13, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@colings86
Copy link
Member

colings86 commented Aug 13, 2014

The expand_wildcards option supports 'open', 'closed', and 'open,closed'. If you specify 'closed' and the defaultSettings are 'open', both open and closed indices will match. This is because the defaults are pre-selected so even if only 'closed' is provided in the request, open will still be set as well. Need to change it so it only sets the defaults if the "expand_wildcards" parameter is not provided

see: https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/support/IndicesOptions.java#L155-168

@colings86 colings86 added bug labels Aug 13, 2014

@javanna

This comment has been minimized.

Copy link
Member

javanna commented Aug 13, 2014

Right, this is odd, caused by the fact that usually you just want to either expand to open or open and closed, not closed only.

One other thing that I noticed is that it is not possible to disable expanding wildcards from the REST layer, while it would be possible from the java api I think.

@martijnvg

This comment has been minimized.

Copy link
Member

martijnvg commented Aug 14, 2014

@javanna You're right this issue doesn't manifest when used from the Java api.

@colings86 colings86 removed the adoptme label Aug 15, 2014

@colings86 colings86 self-assigned this Aug 15, 2014

@colings86 colings86 changed the title Cannot expand_wildcards for only closed indices REST API: Cannot expand_wildcards for only closed indices Aug 15, 2014

colings86 added a commit to colings86/elasticsearch that referenced this issue 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 elastic#7258

colings86 added a commit that referenced this issue 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 added a commit that referenced this issue Sep 8, 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
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.