-
Notifications
You must be signed in to change notification settings - Fork 25.2k
High level REST client index() is not respecting the indexRequest.setRequireAlias(true) method call #67819
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
Labels
Comments
Pinging @elastic/es-core-features (Team:Core/Features) |
Pinging @elastic/clients-team (Team:Clients) |
martijnvg
pushed a commit
to martijnvg/elasticsearch
that referenced
this issue
Apr 20, 2021
…astic#67865) The main changes are: * Set the require_alias parameter in the reindex, index and update methods in RequestConverters class. * Test that the parameter can be parsed correctly. Closes elastic#67819.
martijnvg
added a commit
that referenced
this issue
Apr 20, 2021
…1914) Backporting #67865 to 7.x branch. The main changes are: * Set the require_alias parameter in the reindex, index and update methods in RequestConverters class. * Test that the parameter can be parsed correctly. Closes #67819. Co-authored-by: bellengao <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The following code:
Expected behaviour:
Should throw a RuntimeException (because of
indexRequest.setRequireAlias(true)
) and in our tests ("test-index") does not exist.How it worked:
However, it did not throw an Exception but instead created a new index named "test-index" (default behaviour).
It seems it does not take
indexRequest.setRequireAlias(true);
call into account. Checking the code inorg.elasticsearch.client.RestHighLevelClient.index()
method there is a mapping function namedRequestConverters::index
which does not setrequire_alias
parameter as described in docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.htmlElasticsearch version (server / java api) 7.10.1
The text was updated successfully, but these errors were encountered: