-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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 High Level client putMapping operation doesn't respect IndicesOptions.lenientExpandOpen() #57045
Labels
Comments
Evgueni-Gordienko
added
>bug
needs:triage
Requires assignment of a team area label
labels
May 21, 2020
Pinging @elastic/es-core-features (:Core/Features/Java High Level REST Client) |
elasticmachine
added
the
Team:Data Management
Meta label for data/management team
label
May 22, 2020
cbuescher
pushed a commit
to cbuescher/elasticsearch
that referenced
this issue
May 25, 2020
Currently, the IndicesOptions set on a High Level rest client PutMappingRequest are not correctly converted to request parameters. This change adds the missing conversion and tests. Closes elastic#57045
@Evgueni-Gordienko thanks for raising this, good catch and spot-on analysis. I opened a PR to fix this in the next 7.7 patch version. |
@cbuescher sure, thanks for scheduling the fix. |
cbuescher
pushed a commit
that referenced
this issue
May 27, 2020
Currently, the IndicesOptions set on a High Level rest client PutMappingRequest are not correctly converted to request parameters. This change adds the missing conversion and tests. Closes #57045
cbuescher
pushed a commit
that referenced
this issue
May 27, 2020
Currently, the IndicesOptions set on a High Level rest client PutMappingRequest are not correctly converted to request parameters. This change adds the missing conversion and tests. Closes #57045
cbuescher
pushed a commit
that referenced
this issue
May 27, 2020
Currently, the IndicesOptions set on a High Level rest client PutMappingRequest are not correctly converted to request parameters. This change adds the missing conversion and tests. Closes #57045
cbuescher
pushed a commit
that referenced
this issue
May 27, 2020
Currently, the IndicesOptions set on a High Level rest client PutMappingRequest are not correctly converted to request parameters. This change adds the missing conversion and tests. Closes #57045
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elasticsearch version (
bin/elasticsearch --version
): the latestJVM version (
java -version
): 1.8OS version (
uname -a
if on a Unix-like system): Mas OSDescription of the problem including expected versus actual behavior:
When performing putMapping operation via Rest High Level Client and setting indices option to lenientExpandOpen an ElasticsearchStatusException is thrown in case when no indices were found. I expect no error to be returned.
Steps to reproduce:
Just perform something like this:
The root cause is in org.elasticsearch.client.IndicesRequestConverters, line 134.
For some reason, for the putMapping method there is no line like the following:
parameters.withIndicesOptions(putMappingRequest.indicesOptions());
which is present in many other methods of the class.Because of that the resulting URL doesn't include the following parameters:
?ignore_unavailable=true,allow_no_indices=true,expand_wildcards_open=true,expand_wildcards_closed=false
And hence, I am getting back index_not_found_exception.
The text was updated successfully, but these errors were encountered: