-
Notifications
You must be signed in to change notification settings - Fork 1.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
[BUG] Java high-level REST client bulk() is not respecting the bulkRequest.requireAlias(true) method call #12958
Comments
Want to help? Turn this into a (failing) unit test? |
Will not create a pull request for just the test. But To the developer implementing this fix, you can execute the integration test by:
when the following test case method (extend/modify to your liking) is added to
|
@peternied I would like to work on this issue. Can I raise pull request for this? |
@parv0201 Thank you, I'll assign this issue to you. |
Describe the bug
The Java high-level REST client
bulk(BulkRequest bulkRequest, RequestOptions options)
is not respecting thebulkRequest.requireAlias(true)
method call. It automatically creates an index with the name of the alias which should not happen when the require alias flag is set.Related component
Clients
To Reproduce
Following are 4 examples of how the require alias flag can be set and should be respected.
Fail 1: Auto creates the index
testindex-1
Fail 2: Auto creates the index
testindex-2
Fail 3: Auto creates the index
testindex-3
Fail 4: Auto creates the index
testindex-4
Expected behavior
At the moment the 'require alias' flag does not get transferred from the high-level REST client to OpenSearch and OpenSearch automatically creates the index with the name of the alias. This should not happen. It should fail in case there is no index with the alias.
Logged call from the first example (Fail 1):
Additional Details
Belongs to OpenSearch 2.12.0.
Btw. require alias works fine for single
IndexRequest
calls, thanks to this fix: #1528or when the bulk request gets called by hand
Example content from 'responseString'
The text was updated successfully, but these errors were encountered: